mail() sometimes sends with empty subject/headers...
I'm using the simple mail() function.
mail($To, $Subject, $Message, $headers);
95% of the time it works fine, but twice now it has sent out the mail using the correct 'to' and 'message' fields but the 'subject' and 'headers' were empty.
I declare the 'subject' immediately before sending the mail with this line:
$Subject = "Quote (".$thecountry."/".$lang.") ".strip_tags($_POST['company_name']);
The headers are also set in this way, then the mail is sent. I can't think of anything that would cause the values to disappear such as using sessions etc.
Whats going on here?
well if you posted more of your code it might be easier to help you. Were you using the same email service every time? Was there anything that would make the failures reproducable?
Yes the same email service each time. I cant reproduce the error, even if I use the same data as was sent before. It seems a bit random as to when it does this error, however its always an email in chinese or korean that is affected. I dont think it is code related, more like a server setup thing or a problem on the email client.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)