Jump to content

php mail() user not found


hoogie

Recommended Posts

I've put together an application form that dumps the results into an e-mail and sends it to an e-mail address at the company I'm building the site for.  I've tested it with three of my personal e-mail addresses (gmail, hotmail, and my work address, which is on an Exchange server), and it works on all of them.

 

When I set it to the final address, however, it bounces it back to me, giving me the message "User not found".

 

I don't know much about the e-mail server this company is using, but I have talked to them about the problem and they don't seem to know much about it either  :-)  They don't know why it's being denied or what they could do to fix it.

 

So my question is twofold.  1)  Is there something I can do with my code to make it more likely that the e-mail will make it past their filters, and 2) Are there any suggestions I could give them for changes to make on their server that would allow my e-mails through?

 

Thanks in advance.

 

Here's the code:

$mail_to = '[email protected]';
$mail_subject = 'Application from xxxxx Website';
$mail_headers = "MIME-Version: 1.0" . "\r\n";
$mail_headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";
// the $s_email variable comes from the form that has been submitted.
// It has already been validated and sanitized
$mail_headers .= 'Reply-To: <'.$s_email.'>'. "\r\n"; 
$mail_headers .= 'Return-Path: <'.$s-email.'>' . "\r\n"; 
$mail_headers .= 'From: Bethesda Home Website <[email protected]>' . "\r\n";
$mail_body = 'body';

mail($mail_to, $mail_subject, $mail_body, $mail_headers);

Link to comment
https://forums.phpfreaks.com/topic/205347-php-mail-user-not-found/
Share on other sites

Thanks for your response.

 

I know the address is correct because I can send mail to it successfully from my personal e-mail address.  In fact, the temporary workaround I have in place is to have the form send the e-mail to me, and I have a filter that bounces it out to the correct address.  So I know the problem isn't the e-mail address and I've checked it many many times.

Then you look at the mail logs on your site to see if there is another message being received from the client. Also, involve the client's system admin people to look at their email logs to see why it's rejecting the email message.

 

Ken

It may be a generic SPAM rejection message. Only thing I can think of at the moment is to make sure the domain of the email address being used as the FROM: matches that of the server it is being sent from.

Thanks.  I did change the From: to the server domain, but it didn't seem to help. 

 

I was hoping that I wouldn't have to deal with their System Admin people, as I've talked to them about this problem before and they don't seem to even know where to find the settings for their mail server, but I guess I may have to try again.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.