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
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
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
Share on other sites

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.

Edited by jazzman1
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.