• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 756
  • Last Modified:

email from php form going getting filtered as spam

Hello,

I am sending a verification email to my new users and I am having an issue with it getting filtered out on gmail and a couple others but it does delver to some.

I would love any pointers.
$subject = "dd.com || User Varification";
    $message = "
Dear $first_name $last_name,
    
Thank you for registering!
    
You are two steps away from joining dd.com.
    
To activate your membership,
please click here: http://www.dd.com/activate.php?id=$userid&code=$db_password
    
Once you activate your memebership, you will be able to login with the following information:
 
Username: $username
Password: $random_password
    
Thank you,
dd.com Staff
    
This is an automated response, please do not reply!"; 
    mail($email_address, $subject, $message, 
        "From: dd.com <mg@dd.com>\n" );

Open in new window

0
movieprodw
Asked:
movieprodw
  • 9
  • 3
  • 3
  • +2
4 Solutions
 
Benji_Commented:
Ensure that your email address is a VALID email address and if a  test mail was sent it would be able to verify.

also check your reverse records are also valid

:D
0
 
CraybeCommented:
I agree with Benji generally the problem is that you don't have a proper HELO it may be using root@localhost or the like.

If you are using your own webserver I would advise you change your sendmail outgoing mail host.  If it isn't contact the help desk for your webserver and they may be able to assist you with the problem.

Sorry I can't be more help but your code appears to be solid, I think it is just a server problem.
0
 
movieprodwAuthor Commented:
I am using info@myhost.com

does that sound wrong?
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
Benji_Commented:
if you email info@yourhost.com  does the email arrive at an inbox or is that box not createD?
0
 
movieprodwAuthor Commented:
Hello,

I talked with my server and they said that they set a SPR or something that will make it so that it will work?

I will let you know.

Thanks for your tips!
0
 
NerdsOfTechTechnology ScientistCommented:
Also double check the spelling. A lot of people don't know this but SPAM FILTERS keep an eye out for MISSPPEEELLLINGS :) Especially in the SUBJECT

Avoid using special characters like PIPE '|'
"Verification"
I would suggest using this subject instead

$subject = "Email Validation - Thank you for registering with dd.com";
0
 
movieprodwAuthor Commented:
I will try that!

It is still getting blocked and that could be it
0
 
movieprodwAuthor Commented:


I did change the subject and still nothing. So I copied and pasted the email into my mail program and sent it from my computer using the same email/subject/message and it worked just fine

I have the email below, please let me know if you see anything.
Dear Bob Lastname,
 
Thank you for registering!
 
You are two steps away from joining dd.com.
 
To activate your membership,
please click here: http://www.dd.com/activate.php?id=16&code=4437b6b428875aacbf3cf40c97f7c96d
 
Once you activate your membership, you will be able to log in with the following information:
 
User name: Matt
Password: 914hjv7p
 
Thank you,
dd.com Staff
 
This is an automated response, please do not reply!

Open in new window

0
 
NerdsOfTechTechnology ScientistCommented:
maybe it is your from address? to short?

noreply@dd.com would be a better from address maybe?
0
 
NerdsOfTechTechnology ScientistCommented:
I agree with the other experts. it sounds like the email server is the issue then.
0
 
movieprodwAuthor Commented:
I got some interesting info from the log!
Email from = anonymous@555-55-555-55.dedicated.abac.net
 
[Sun Apr 26 14:51:17 2009] [error] [client 64.150.178.3] PHP Notice: Undefined index: msg in /var/www/vhosts/dd.com/httpdocs/index.php on line 4
[Sun Apr 26 14:55:15 2009] [error] [client 72.201.141.63] PHP Notice: Undefined variable: first_name in /var/www/vhosts/dd.com/httpdocs/join_form.php on line 6
[Sun Apr 26 14:55:15 2009] [error] [client 72.201.141.63] PHP Notice: Undefined variable: last_name in /var/www/vhosts/dd.com/httpdocs/join_form.php on line 10
[Sun Apr 26 14:55:15 2009] [error] [client 72.201.141.63] PHP Notice: Undefined variable: email_address in /var/www/vhosts/dd.com/httpdocs/join_form.php on line 14
[Sun Apr 26 14:55:15 2009] [error] [client 72.201.141.63] PHP Notice: Undefined variable: username in /var/www/vhosts/dd.com/httpdocs/join_form.php on line 18
[Sun Apr 26 14:55:15 2009] [error] [client 72.201.141.63] PHP Notice: Undefined variable: info in /var/www/vhosts/dd.com/httpdocs/join_form.php on line 21
[Sun Apr 26 14:55:27 2009] [error] [client 72.201.141.63] PHP Notice: Undefined variable: pass in /var/www/vhosts/dd.com/httpdocs/registration.php on line 98, referer: http://dd.com/login.phpdd.com

Open in new window

0
 
CraybeCommented:
I may be way off target here but is it possible that your php form is being abused?

In your PHP do you have any functions that check for the use of "content-type:", "charset=", "mime-version:", "multipart/mixed", "cc:", "bcc:" in the variables received for email?  These can be used to send spam using the sendmail on your server which could lead to you being blacklisted on spam servers such as spamhaus (or the gmail equivalent).  If you are blacklisted you could find that that is what is causing your emails to be bounced as spam.

When an email gets filtered as spam do you receive a server message letting you know why?  Or is there anything attached to the email at the receivers end that lists the reason for it being blocked, even if it is just server gibberish?

note:  I just checked your websites ip 67.207.67.21 in a majority of spam blacklists and you appear clear, but it is still something to be careful of.  Perhaps you would be best with a new PHP email script.  I have listed the full script I wrote for all of my php email forms at http://www.experts-exchange.com/Software/Photos_Graphics/Web_Graphics/Macromedia_Flash/Q_24331507.html  (last answer) perhaps give it a try as it may be something in your php method causing the problem.
0
 
movieprodwAuthor Commented:
Ok, so I tried craybe's script and could not get it to work so I decieded that if I authenticated the SMTP then it would have to work right!

I installed pear on my server and ran the script below, once again, it goes to my some emails but still gets blocked from hotmail, google, yahoo!

Any suggestions would be appreciated!
// include PEAR mail classes
include('Mail.php');
 
 
$recipients = "mg@dd.com";
$headers["From"] = "ddemail@dd.com";
$headers["To"] = "mg@dd.com";
$headers["Subject"] = "User feedback";
$mailmsg = "Hello, This is a test.";
/* SMTP server name, port, user/passwd */
$smtpinfo["host"] = "mail.dd.com";
$smtpinfo["port"] = "25";
$smtpinfo["auth"] = true;
$smtpinfo["username"] = "ddemail@dd.com";
$smtpinfo["password"] = "dd";
/* Create the mail object using the Mail::factory method */
$mail_object =& Mail::factory("smtp", $smtpinfo);
/* Ok send mail */
$mail_object->send($recipients, $headers, $mailmsg);

Open in new window

0
 
Benji_Commented:
Spam checks from your domain are NOT going to take affect straight away it takes between 7 -28days for the system to unblock your domain aslong as your emails arriving in correct format and no one is using your domain to spam.

Hope this helps:D
0
 
movieprodwAuthor Commented:
Ok but I own a domain and its getting blocked from that one also, its extremely unlikely that any spammer has spammed my own account.

And don't you think its odd that I can send a domain an email using the same account from my email at it works but not from my script?
0
 
jar3817Commented:
Can you get your hands on the headers of one of these messages? Like send it to your own gmail account or something. It'll be really helpful to see what the message looks like on the receiving end.

I was going to suggest using the pear mail package, but I see from a couple posts above you're already using it.

Are you trying to deliver these message directly to the recipients or sending to your hosting company's relay server first? If not, I'd suggest forwarding to their relay and let it deliver the messages.
0
 
movieprodwAuthor Commented:
Hello,

I am sending it from my smtp through the pear script.

Jar mentioned sending it through the hosting relay server, how would I do that?
0
 
movieprodwAuthor Commented:
Thanks for all your help, it is still doing it but I have just routed my emails around the issue.

Thanks again!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

  • 9
  • 3
  • 3
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now