PDA

View Full Version : Automated Emails put in junk (google, msn) normal emails fine


thekevin07
10-13-2007, 03:00 PM
For some reason all of the email i send using PHP gets marked as spam. I am using google apps for my email host. I have a spf record setup per google's recomendation (link 1) I am using a php script to send email other then mail(); (link 2) and still my emails are marked as spam. If i send an email using googles webbased interface of google apps the email sends fine and arrives in the inbox. The domain is clickonlinehomes.com Does anyone know what ive done wrong or forgot to do?


link 1: http://www.google.com/support/a/bin/answer.py?hl=en&answer=33786

link 2: http://www.vulgarisoip.com/2006/10/13/update-send-email-with-php-and-gmail-hosted-for-your-domain/


Thanks in advance

_Aerospace_Eng_
10-13-2007, 03:40 PM
Without code, we can't help you. Chances are you've got the headers incorrect or the from part is incorrect or your mx record is incorrect.

CFMaBiSmAd
10-13-2007, 03:47 PM
Is the From address something@clickonlinehomes.com? What other email headers are you setting? Posting your code would help as it will probably answer these questions and show what else you are or are not doing.

Your DNS records do not have any problems that would contribute to getting email voted as spam/junk - http://www.dnsstuff.com/tools/dnsreport.ch?domain=clickonlinehomes.com

This leaves something like the sending mail server appears in spam databases, something is wrong with the structure of your email (such as the domain in the from address not being the same as your domain), or the subject/message body contains enough spam like content to get the email voted as spam.

thekevin07
10-13-2007, 03:53 PM
The source code is
require_once('phpgmailer/class.phpgmailer.php');

$mail = new PHPGMailer();
$mail->Username = 'user@clickonlinehomes.com';
$mail->Password = 'pass';
$mail->From = 'user@clickonlinehomes.com';
$mail->FromName = 'User Name';
$mail->Subject = 'Account information';
$mail->AddAddress('thekevin07@hotmail.com');


$mail->Body = "
Hello $user,

Your account details are below";
//$mail->AddStringAttachment('homepictest.jpg', "homepictest.jpg");
if($mail->Send())
{
echo ("ok");
}

_Aerospace_Eng_
10-13-2007, 03:58 PM
Now we need to see the code for your class, class.phpgmailer.php

thekevin07
10-14-2007, 01:50 AM
codingforums wont let me to many chars the entire package can be downloaded directly from this link

http://www.vulgarisoip.com/files/phpgmailer.zip

everything in there is exactly how i have it