Link to home
Start Free TrialLog in
Avatar of lepirtle
lepirtle

asked on

email script for bellsouth

I created a script to send an email to 3 recipients: a bellsouth.net, mydomain.com, and a gmail.com domain. Two of the recipients receive the email without a problem but the bellsouth.net address says that she has not received anything. Is there something that I am missing in my script or is there some peculiarity with bellsouth that is preventing my email from transmitting?

The relevant code is attached.
<?php
/* Email the recipients. */
$to  = "user1@bellsouth.net, user2@mydomain.com, user3@gmail.com";
// Additional headers
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";
$headers .= 'From: user2@mydomain.com' . "\r\n";
$headers .= 'Reply-To: user1@bellsouth.net' . "\r\n";
$subject = 'A test email';
$message = 'A test email was transmitted';
// execute the mailing function
mail($to, $subject, $message, $headers);
?>

Open in new window

Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

I would try sending an individual email to "user1@bellsouth.net".  Also note that your message is actually "text/plain" and not "text/html".  

And that the 'Reply-to" is different from the "From:" and from a different domain is one of the signs of 'phishing' emails.  Mail servers spend most of their time blocking spam and anything that looks a little like spam is often rejected.  And no, it is not your choice.  Spam is what the receiver says it is.
Avatar of lepirtle
lepirtle

ASKER

Hi Dave,
Thanks for the information.

I will try to send to an individual user. That is one idea that I didn't test since having my own address allowed me to ascertain that the email was actually being sent. Unfortunately I must wait till tomorrow to find if that user actually receives it but I will give your idea a try.

My original email was html but I forgot to change the type when I published the script to Experts Exchange but I will change it when I send the test to the individual user that you suggest above.

As for the 'Reply-To' and 'From ' question: the reason for that is that the script actually resides on my server (hosted by godaddy) and not the bellsouth user's server. (I volunteer as webmaster for the not-for-profit). When I couldn't get my script to work using only a 'From' header I thought adding a 'Reply-to' header would be a workaround for a potential phishing filter that bellsouth might have in place. Assuming that is the problem, might you have another suggestion as a workaround? It would seem to me not to be that uncommon for mailing scripts on non-bellsouth servers to be emailing bellsouth customers.
You are probably hitting the spam filters (really hard if your email is coming from GoDaddy).  A better solution would be to use a service like Constant Contact.  They are reliable, embarrassingly inexpensive and a far better solution than trying to live day-to-day with the thankless task of making PHP mail() commands work!  Trust me, I've been there on behalf of a non-profit.  Everyone, especially me, liked Constant Contact.
I would eliminate the "Reply-To", it is more likely causing it to look like a 'phishing' email.  I know that Spamassassin on one of my hosting accounts doesn't like the Godaddy email server that shows in emails from hosting accounts there.  Also, your "From" address should be an email account on your hosting so that when it is checked by outside mail servers, it shows the right values and IP addresses.  Some mail servers will bounce or dump email that is sent from an IP address that does not match the 'legitimate' mail server for that domain.

And you thought email was easy...
Hi Dave and Ray,
I truly appreciate your insights and experience with the mail server anti-phishing routines and would be happy to accept your recommendations but the email that I am attempting to send to the bellsouth recipient contains the results of a form which resides on my godaddy server. Basically a user completes a form (sitting on my godaddy server) and the results of the validated data is processed by my php page and then emailed to the bellsouth user and other non-bellsouth users. That is why I can't (or at least I don't think I can in this case anyway) use something like 'Constant Contact' to complete the piece of the puzzle by emailing the results of my form to the bellsouth recipient.
I'll sign off on this question now.  You're involved in an application that has failed for thousands of people before you because of perceived expectations and limitations and "I don't think" issues.  I strongly recommend that you hire a professional developer to help with this, and I urge you to have a substantial development budget.  It will be expensive or successful, but not both.  Good luck and godspeed, ~Ray
ASKER CERTIFIED SOLUTION
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks Dave and Ray. I will consider the issue closed.
This is an update to anyone who might have had a similar situation. Bottom line is that it was, indeed, a Bellsouth filter that was preventing my email from being received by bellsouth.net users. After speaking at length with a Bellsouth (AT&T) representative, I was provided a form to complete. After waiting 4 weeks they finally adjusted the filters to allow my email script to transmit to the bellsouth.net users. No adjustment to my script was required.