Results 1 to 3 of 3

Thread: mail() sometimes sends with empty subject/headers...

  1. #1
    Join Date
    Jun 2006

    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?

  2. #2
    Join Date
    Jan 2007
    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?

  3. #3
    Join Date
    Jun 2006
    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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center