Solved

email script for bellsouth

Posted on 2013-11-21
10
280 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
  • 4
  • 3
  • 3
10 Comments
 
LVL 82

Expert Comment

by:Dave Baldwin
Comment Utility
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
Comment Utility
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 108

Expert Comment

by:Ray Paseur
Comment Utility
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
 
LVL 82

Expert Comment

by:Dave Baldwin
Comment Utility
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 108

Expert Comment

by:Ray Paseur
Comment Utility
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 

Author Comment

by:lepirtle
Comment Utility
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 108

Expert Comment

by:Ray Paseur
Comment Utility
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 82

Accepted Solution

by:
Dave Baldwin earned 500 total points
Comment Utility
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
Comment Utility
Thanks Dave and Ray. I will consider the issue closed.
0
 

Author Comment

by:lepirtle
Comment Utility
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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

763 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now