title: Zend Mail and Spam
body: <p>I'm using Zend_Mail for send multiple mails to my users
  It is work well but i have some problem with spam (like gmail)</p>
  
  <p>I found this but didn't work for me (mail continue to go in spam folder)
  <a href="https://stackoverflow.com/questions/3692100/zend-mail-sent-email-is-treated-as-spam">Zend_Mail sent email is treated as SPAM</a></p>
  
  <p>maybe could be a problem in relation of smtp server and my "setReplyTo" ?</p>
  
  <p>smtp server: authsmtp.duenove.it
  setReplyTo : the_email@fasys.it</p>
  
  <p>the code:</p>
  
  <pre><code>require("Zend/Mail.php");
  require("Zend/Mail/Transport/Smtp.php");
  
  $config = array('auth' =&gt; 'login',
                  'username' =&gt; 'myusername',
                  'password' =&gt; 'mypassword');
  
  $transport = new Zend_Mail_Transport_Smtp('authsmtp.duenove.it', $config);
  
          //test email - for test only
          $cliente[0]['mail']="vobislab@libero.it";
          $cliente[0]['name']="Andrea Mariani";
  
          $cliente[1]['mail']="noreply.mario@gmail.com";
          $cliente[1]['name']="Andrea Gmail";
  
  
  $mail = new Zend_Mail();
  
  $mail-&gt;setReplyTo('info@fasys.it', 'Vobis Valdarno 2.0');
  $mail-&gt;addHeader('X-Abuse', 'Please report abuse: andream@fasys.it');
  $mail-&gt;addHeader('List-Unsubscribe', 'http://www.vobisvaldarno.it/newsletter/unsubscribe/');
  $mail-&gt;addHeader('MIME-Version', '1.0');
  $mail-&gt;addHeader('Content-Transfer-Encoding', '8bit');
  $mail-&gt;addHeader('X-Mailer:', 'PHP/'.phpversion());
  
  $mail-&gt;setFrom('fasys@vobisvaldarno.it', 'Vobis Valdarno 2.0');
  
  
  foreach($cliente as $k =&gt; $c){
  
  
  $mail-&gt;addTo($c['mail'], $c['name']);
  $mail-&gt;setSubject('Hello '.$c['name'].', this is a test');
  
  
  $body=
  '&lt;!doctype html&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;meta charset="utf-8"&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;p&gt;test html mail&lt;/p&gt;
  &lt;/body&gt;
  &lt;html&gt;';
  
  $mail-&gt;setBodyHTML($body);
  
  
  //send and clear message
  $mail-&gt;send($transport);
  $mail-&gt;clearRecipients();
  $mail-&gt;clearSubject();
  
  }
  </code></pre>
  
  <p>Thanks you all in advice</p>