I am confused in little matter. When ever I send mail to my subscriber, It mostly went to spam or bulk box. I am using mail() funtion. And Now I want to use via SMTP, So can any one suggest/write code for me to send mail using SMTP. Thanks in Advance. Riya
It does not matter whether you use PHP's builtin mail() function or some other method to send email. Your messages and/or tour domain are triggering rules in spam filters. For instance, email messages about "home equity loans" are probably blocked by 99.99% of the spam rule sets used by ISPs. There are two ways around these problems. 1 - ask members to put your sending email on their whitelist and make sure they understand that you will be contacting them on a regular basis 2 - limit emails to subscribers to information they need to know about the website and important updates . . . keep the marketing messages on the website and out of the emails
If you are looking for SMTP to send your email, look at http://www.swiftmailer.org/ Make sure that you have subject, from and proper header pass to mail() before sending out.
You can use mail() with the '-f' sendmail parameter, like this mail('nobody@example.com', 'the subject', 'the message', null, '-fsender@domain.com'); PHP: http://php.net/manual/en/function.mail.php This should help you get around stupid spam killers.
for SMTP try http://codewalkers.com/forum/index.php?action=displaythread&forum=pear&id=270&realm=default