Hey everyone, this following PHP script I'm using along with Swiftmailer is being caught as Spam on the mail server it's being sent to. The reason its being caught as spam, is because the header information is "malformed", or so my web host tells me. If anyone sees something that would cause this in the code, please let me know. Thanks.
PHP Code:$subject = "Website: News Story needs review/activation.";
$message = "There has been a news item submitted for review";
require_once "lib/Swift.php";
require_once "lib/Swift/Connection/SMTP.php";
require_once "lib/Swift/Authenticator/LOGIN.php";
$conn =& new Swift_Connection_SMTP("mail.midstatemutual.com");
$conn->attachAuthenticator(new Swift_Authenticator_LOGIN());
$conn->setUsername("gregj@midstatemutual.com");
$conn->setPassword("password");
$swift =& new Swift($conn);
$message =& new Swift_Message("$subject", "$message");
if ($swift->send($message, "gregj@midstatemutual.com", "gregj@midstatemutual.com")) echo "Sent";
else echo "Failed";






Bookmarks