Jump to content

PHP mail function reporting mail sent but mail never received


clem_c_rock

Recommended Posts

Hello,

  I have a script that suddenly stopped working and nothing's been changed.      I am using the php mail() function to send a simple email form and the mail() function report true when it is fired off but I can never receive the emails.

 

I suspect something's changed in our hosting but wanted to rule everything out before I started investigating there.

 

Here's the simple code I am using:

 

 

  $send_tenant_mail = mail( $tenant_email, $subject, $body_header, "From: $from\nReply-To: $from\n" );
          if($send_tenant_mail == 1)
  { 
      $confirm = "A Confirmation Email has been sent to: $tenant_email";
  }

 

 

Thanks,

Clem C

You need to check your server log.  The syntax is right, but the mail server may be denying it since the From is not from your domain.  It's also possible the ISP you are sending it to is flagging it as spam.

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.