Re: mail function won't send if From: domain != mail domain
- From: Jasen Betts <jasen@xxxxxxxxxxx>
- Date: Fri, 10 Feb 2006 21:32:37 -0000
On 2006-02-03, Seth Darr <seth@xxxxxxxxxx> wrote:
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@xxxxxxxxxxxxxxx";
[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@xxxxxxxxxx".
Anything else loops through, but no error messages are flagged.
possibly somone further up the line from them decided the from addresses
were forged, or someone on the server was sending spam...
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.
unless you can find another serve that's willing to relay the emails for you
there's probably nothing you can do other than change providers.
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@xxxxxxxxxxxxxxx";
$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";
should probably have "Precedence: bulk" in there too.
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.
change proviffder or get the PHP to emit something that can be saved at taken to otherdomain.com
and posted/run there.
-Seth
seth_darr@xxxxxxxxxxx
--
Bye.
Jasen
.
- References:
- mail function won't send if From: domain != mail domain
- From: Seth Darr
- mail function won't send if From: domain != mail domain
- Prev by Date: Re: GPG with PHP (using PECL gnupg extension)
- Next by Date: Re: PHP vs ASP.NET?
- Previous by thread: Re: mail function won't send if From: domain != mail domain
- Next by thread: Re: Storing IP in MySQL as DOUBLE or INT ?
- Index(es):
Relevant Pages
|