Solved

email script for bellsouth

Posted on 2013-11-21
10
290 Views
Last Modified: 2014-01-05
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

0
Comment
Question by:lepirtle
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 3
10 Comments
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 39667386
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.
0
 

Author Comment

by:lepirtle
ID: 39667547
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.
0
 
LVL 110

Expert Comment

by:Ray Paseur
ID: 39667699
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.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 39667745
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...
0
 
LVL 110

Expert Comment

by:Ray Paseur
ID: 39667895
0
 

Author Comment

by:lepirtle
ID: 39668098
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.
0
 
LVL 110

Expert Comment

by:Ray Paseur
ID: 39668105
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
0
 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 500 total points
ID: 39668119
It is likely that the failure of the email to the BellSouth user is entirely because of the email filtering by BellSouth.  If that is the case, there is nothing you can do with your form that will overcome it.  While we have given you a few suggestions, it is in the end their [Bellsouth] choice.
0
 

Author Closing Comment

by:lepirtle
ID: 39668935
Thanks Dave and Ray. I will consider the issue closed.
0
 

Author Comment

by:lepirtle
ID: 39757947
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.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

These days socially coordinated efforts have turned into a critical requirement for enterprises.
There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

631 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question