Saturday, 15 June 2013

PHP bulk mail using "phpmailer" lands in SPAM -



PHP bulk mail using "phpmailer" lands in SPAM -

i using next php code send mass mail service .but mails seems land in spam.i using "phpmailer" class send mail.

require 'mailer/class.phpmailer.php'; $mail = new phpmailer(); $mail->issmtp(); $mail->smtpauth = true; $mail->smtpsecure = "ssl"; $mail->host = "smtp.gmail.com"; $mail->port = 465; $mail->username = "info@gmail.com"; $mail->password = "bexwa44puciz"; // gmail password $mail->addreplyto('info@gmail.com', 'info'); $appname = 'info.com'; $_subject="newsletter from: ".$appname; $ema=","; $to_bcc=explode(",",$ema); $mail->addcustomheader($headers); foreach($to_bcc $tb){ $mail->addbcc($tb, $dname); } $_body ="news content";//$hid; $mail->fromname = "info.com"; $mail->from="inf@gmail.com"; $mail->subject = $_subject; $mail->altbody = "to view message, please utilize html compatible email viewer!"; $mail->msghtml($_body); if($mail->send()){ echo "done"; }else { echo "failed"; }

there number of reasons going someones spam box. email server blacklisted due either you, or user on server. can check @ http://mxtoolbox.com/blacklists.aspx

also check spf records in dns

php phpmailer spam bulk-mail

No comments:

Post a Comment