Avatar of Bruce Gust
Bruce Gust
Flag for United States of America asked on

Why would hotmail not get this email when other servers do?

First of all, here's my code:

$msgText="";
$msgText="Thanks for your interest in \"Loose Cannon Fitness!\"<br><br>Below is the link to your <b>";
$msgText.=$workout;
$msgText.="</b> workout.<br><br>Remember, you will need to be at your desktop computer to import your the audio files into your iTunes application.<br><br>If the link doesn't seem to work, copy and paste the link into your internet browser:<br><br>Thanks!<br><br>";
$msgText.="<a href=\"http://loosecannonfitness.com/downloads.php?email=";
$msgText.=$email;
$msgText.="\" target=\"_blank\">http://loosecannonfitness.com/downloads.php?email=";
$msgText.=$email;
$msgText.="</a>";


	$ccText="bruce@brucegust.com";
	$toText = $email;
	$fromText = "info@loosecannonfitness.com";
	$subjectText="your free workout download";
	//$subjectText .=$fromText;
	$header = "From: ".$fromText."\r\n";
	$header .= "Bcc: ".$ccText."\n";
	$header .= "Reply-To : ".$fromText."\r\n";
	$header .= "Return-Path : ".$fromText."\r\n";
	$header .= "X-Mailer: PHP\r\n";
	$header .= "MIME-Version: 1.0\r\n";
	$header .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
	//	ini_set(sendmail_from,$fromText);  
	$postoffice=mail($toText, $subjectText, $msgText, $header, '-f'.$fromText);
$voting_friends=0;
$logout_url = "";
$login_url ="";

Open in new window


I've tested this with several people and it works fine. Recently, however, I had a user not receive it. He's on hotmail.com and I'm wondering if there's something about my script that needs to be improved in order to avoid leaving some of my users hanging.

BTW: I would welcome anyone who wants a free fitness resource to test my site. The aforementioned "snag" aside, the more people I have kicking the tires on this thing, the better. Here's the URL: http://loosecannonfitness.com/hammons.php
PHP

Avatar of undefined
Last Comment
Dave Baldwin

8/22/2022 - Mon
SOLUTION
John

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Bruce Gust

ASKER
He did. I got the email as the one who is "CC'd," but he didn't get anything. I emailed him myself using the very same email address he inputted and it arrived without any problem. So the address is sound, the code seems healthy - i don't know what the problem could be.
John

Each user Spam filter (whitelist / blacklist) is unique to the user. So you need to check spam filtering with the user.
SOLUTION
Jason Carson

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
Dave Baldwin

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
John

Web server mail should have a proper sending domain. If the email cannot be traced back, grey listing may shunt it into oblivion.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
Jason Carson

Spelling fix from my previous post "change" should be "chance"

Just to test things out I changed the recipient email address on my web form to a hotmail address and when I sent the form.  It was successfully received by the hotmail account. My form uses PHP mail() too.
ASKER CERTIFIED SOLUTION
Dave Baldwin

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
Ray Paseur

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Bruce Gust

ASKER
Alright, guys! Here's where I've landed based on your input:

Bottom line: There is no foolproof way to guarantee my user is going to receive an email from my web server, regardless of how sound and / or basic my PHP script may be. Reason being is that the criteria used to define an incoming email as being SPAM varies and, in some instances, includes the qualifier of whether or not said email is coming from a web server versus a mail server.

And even with a service such as icontact or Constant Contact, although you've got a much better chance of arriving in your user's inbox, you're still at risk in that even they can't guarantee your email is going to arrive intact.

I have since tested my script on gmail and I've had some other successes, but I've changed my infrastructure so rather than the critical link that I was emailing my user being available ONLY through that email, I'm now making it available on the page that was, up until now, simply telling them to check their inbox.

Now, I've got a professional / elegant approach that emails my user, but doesn't leave them without any options if that email fails to arrive.

BOOM!
John

Thanks for the update and good luck with your email.
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Dave Baldwin

Good luck.  Now you understand how messed email can be.