Jump to content

A mail bug?


JakkkeM

Recommended Posts

Hi all,

 

I'm sending an email with php as a part of my user registration process, and for some reason the mail script begins to fail when I use my full desired email in my headers.

 

I use the standard PHP Manual headers for email:

 

// To send HTML mail, the Content-type header must be set
   $headers  = 'MIME-Version: 1.0' . "\r\n";
   $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

   // Additional headers
   $headers .= 'To: Jake M*** <**********@gmail.com>' . "\r\n";
   $headers .= "From: CFS <noreply@crossfitst.com>" . "\r\n";

 

Now, if I make my last header:

 

$headers .= "From: CFS <noreply@crossfitstmarys.com>"."\r\n";

 

It fails! As soon as I put the m in on CrossfitStMarys it fails the whole script.

 

Any ideas?

 

Cheers.

 

P.S. I have real data in for my Jake M, just censored it out because I don't want everyone having my email haha.

Link to comment
https://forums.phpfreaks.com/topic/272647-a-mail-bug/
Share on other sites

I tested the output and got this in the view source :

string(138) "MIME-Version: 1.0
Content-type: text/html; charset=iso-8859-1
To: Jake M*** <**********@gmail.com>
From: CFS <noreply@crossfitst.com>
"
string(142) "MIME-Version: 1.0
Content-type: text/html; charset=iso-8859-1
To: Jake M*** <**********@gmail.com>
From: CFS <noreply@crossfitstmary.com>
"

nothing being eaten anywhere

Link to comment
https://forums.phpfreaks.com/topic/272647-a-mail-bug/#findComment-1402999
Share on other sites

I seen in the image you popsted that you had changed the From text as well as the address, I assume you have tried it both ways?

 

Also, the other dmains that you are testing it from - do they exist? are they real domains or just something you made up?

 

have you tried the script from a server that has an MX record pointing to it from the actuial domain? if you have access to the domain name settings you can just point an MX record at your dev box's global IP tempereraly for testing purposes.

Link to comment
https://forums.phpfreaks.com/topic/272647-a-mail-bug/#findComment-1403007
Share on other sites

  On 1/3/2013 at 1:35 PM, Muddy_Funster said:

It's just a shame that mail() doesn't do any really usefull error capturing.

It does, there are log files into the server.

 

EDIT: By default a php mail function use a linux client called - sendmail.

Link to comment
https://forums.phpfreaks.com/topic/272647-a-mail-bug/#findComment-1403082
Share on other sites

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.