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



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
.



Relevant Pages

  • mail function wont send if From: domain != mail domain
    ... I have a small-scale mailing list system that loops through a mySql table and calls the mailfunction. ... 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. ... Mostly I've been trying to tinker with the headers on the outgoing emails. ...
    (alt.php)
  • Safe multithreading in ASP.Net
    ... Code in global.asx Application_start subroutine, ... Dim emails As New ForumEmail ... Do While ContinueNotify 'boolean value set to True so loop will continue ... the thread still continues to execute. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Getting emails into MS Access - Code enclosed
    ... *all* messages in the Inbox looking for the unread messages. ... each" loop, thus changing the item count in the folder. ... > run Access to pull emails out of Outlook into my tables automatically. ...
    (microsoft.public.outlook.program_vba)
  • Re: [PHP] Is a while loop the most efficient way to send out multiple emails?
    ... Dave G wrote: ... I use a while loop to send out the emails. ... >that included the recipients name and other personalized information. ...
    (php.general)
  • Re: Sending Many emails at once
    ... Or are you saying you dont know how to do the DB lookup ... >> As we don't want different clients to see who we are working with we ... I would like to write a script to have these emails ... I could figure out the DB lookup loop, if I just knew what to use =( ...
    (microsoft.public.inetserver.asp.general)