I am on a shared, linux, cpanel hosting account if that matters. I do have spam assassin enabled, but how do I see what it says about my emails? (my emails are getting junked in gmail and yahoo, but not actually on my server)
Here is my code if that helps:
Code: Select all
require_once "swift/lib/Swift.php";
require_once "swift/lib/Swift/Connection/SMTP.php";
$swift =& new Swift(new Swift_Connection_SMTP("localhost", 25));
$message =& new Swift_Message("My Subject");
$message->attach(new Swift_Message_Part("My plain message."));
$message->attach(new Swift_Message_Part("My <strong>html</strong> message.", "text/html"));
if ($swift->send($message, "to@toaddress.com", "from@mysite.com")) {
echo "Message sent";
}
else {
echo "Message failed to send";
}
$swift->disconnect();