hoogie Posted June 20, 2010 Share Posted June 20, 2010 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 More sharing options...
hoogie Posted June 21, 2010 Author Share Posted June 21, 2010 Is it kosher to bump in these forums? If so - bump. If not... sorry? Link to comment https://forums.phpfreaks.com/topic/205347-php-mail-user-not-found/#findComment-1074993 Share on other sites More sharing options...
kenrbnsn Posted June 21, 2010 Share Posted June 21, 2010 If mail bounces back with that error message, then you're using the wrong email address. There's nothing PHP can do. Ken Link to comment https://forums.phpfreaks.com/topic/205347-php-mail-user-not-found/#findComment-1074996 Share on other sites More sharing options...
hoogie Posted June 21, 2010 Author Share Posted June 21, 2010 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. Link to comment https://forums.phpfreaks.com/topic/205347-php-mail-user-not-found/#findComment-1074997 Share on other sites More sharing options...
kenrbnsn Posted June 21, 2010 Share Posted June 21, 2010 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 Link to comment https://forums.phpfreaks.com/topic/205347-php-mail-user-not-found/#findComment-1075001 Share on other sites More sharing options...
Pikachu2000 Posted June 21, 2010 Share Posted June 21, 2010 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. Link to comment https://forums.phpfreaks.com/topic/205347-php-mail-user-not-found/#findComment-1075005 Share on other sites More sharing options...
hoogie Posted June 21, 2010 Author Share Posted June 21, 2010 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. Link to comment https://forums.phpfreaks.com/topic/205347-php-mail-user-not-found/#findComment-1075010 Share on other sites More sharing options...
rami103 Posted June 21, 2010 Share Posted June 21, 2010 create this email address on server [email protected] Link to comment https://forums.phpfreaks.com/topic/205347-php-mail-user-not-found/#findComment-1075011 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.