Reply to mail function won't send if From: domain != mail domain

Your name:

Reply:


Posted by Seth Darr on 02/03/06 08:01

I have a small-scale mailing list system that loops through a mySql
table and calls the mail() function. Up until recently, it's been
working just fine like this:

$fromEmail = "admin@otherdomain.com";
[loop for each row]
mail($row['email'],$subject,$msg,"From: $fromEmail");

But now, this only works if the From: email comes from the same domain
as the webhosting server. So let's say my domain name is "domain.com".
The only emails that will send out are "whatever@domain.com".
Anything else loops through, but no error messages are flagged. This
just started about a week ago. I called my webhosting company twice and
each time basically got told that nothing changed on their end that they
know of and that I'd have to find a workaround. I think that's BS, and
that there's been some sort of change in configuration, but anyhow I'm
in a crunch of sort and I'm trying to find a workaround. Mostly I've
been trying to tinker with the headers on the outgoing emails. I
haven't even started tinkering with the "parameters" parameter, as I
know very little about sendmail. Here's where I'm at right now, though
it doesn't work:

$fromEmail = "admin@otherdomain.com";
$headers = "MIME-Version: 1.0\n";
$headers .= "Content-type: text/plain; charset=iso-8859-1\n";
$headers .= "X-Priority: 3\n";
$headers .= "X-MSMail-Priority: Normal\n";
$headers .= "X-Mailer: PHP/".phpversion()."\n";
$headers .= "From: \"The Admin\" <".$fromEmail.">\n";
$headers .= "Reply-To: $fromEmail\n";
$headers .= "Return-Path: $fromEmail\n";

[loop for each row]
mail($row['email'],$subject,$newMsg,$headers);


Does this sound like a problem anyone else has had? Any tips?
Workarounds? I am grasping at straws with this one, and I'd appreciate
any help I can get out there.

-Seth
seth_darr@hotmail.com

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация