Hi,
I'm banging my head at the moment.
I was using straight php mail and went to the spam folder.
I thought if I used SMTP, it'd avoid this, yet it's still going to spam folder on yahoo....
Can anyone help?
I'm investigating reverse DNS at the moment as I'd never heard of it before. Is this a factor I need to be aware of?
Is it necessary for me to set up an SPF record?
BTW - I'm not spamming, these are legitimate emails for my site...
code is :
Code:<?php require_once "Mail.php"; $from = "Sandra Sender <info@mydomain.com>"; $to = "James <asdf@yahoo.com>"; $subject = "testing SMTP mail"; $body = "Hi,\n\nHow are you?"; $host = "mail.u-snap.com.au"; $username = "xxxxx"; $password = "xxxxx"; $headers = array ('From' => $from, 'To' => $to, 'Subject' => $subject); $smtp = Mail::factory('smtp', array ('host' => $host, 'auth' => true, 'username' => $username, 'password' => $password)); $mail = $smtp->send($to, $headers, $body); if (PEAR::isError($mail)) { echo("<p>" . $mail->getMessage() . "</p>"); } else { echo("<p>Message successfully sent!</p>"); } ?>






Bookmarks