Jump to content

Problems with PHP Mail function


Ritchie-T

Recommended Posts

I have made a very simple mail script using the mail function and it works fine on all computers execpt one. For some reason i get the following text inserted at the top of the email message when it comes through:

 

Return-Path: CL3653@business2.34sp.com X-OriginalArrivalTime: 19 Dec 2007 13:54:46.0565 (UTC) FILETIME=[b7034D50:01C84246]

 

Does anybody know how I can stop this comming through?

 

Many thanks,

Ritchie

Link to comment
Share on other sites

Remove it from the headers then//

 

  $headers .= "Return-Path: ".$fromname."<".$fromaddress.">".$eol;    // these two to set reply address
  $headers .= "Message-ID: <".time()."-".$fromaddress.">".$eol;
  $headers .= "X-Mailer: PHP v".phpversion().$eol;    

 

Post your script please

Link to comment
Share on other sites

Thanks for the reply.

 

<?PHP
//convert global variables
$senderName = $_POST['senderName'];
$senderEmail = $_POST['senderEmail'];
$recipientEmail = $_POST['recipientEmail'];

$mailMessage = Email message goes here. Contains basic HTML tags... <br> and <a herf></a>";

    //Build up email header fields
    $mailFrom = "From: $senderEmail\r\n";
    $mailFrom .= "Content-type: text/html\r\n";
    $mailTo = "$recipientEmail";
    $mailSubject = "Seasons Greetings";

    // Send email
    mail($mailTo, $mailSubject, $mailMessage, $mailFrom);

    $response = "Thank you $senderName. Your message has been sent.
<br><br>
<a href='http://www.previouspage.com>Return to previous page</a>";

// Respond
print "$response";

?>

 

I haven't actually used those headers which is strange.

 

It comes though fine on loads of email addresses except for just one. It must be something to do with that domains mail server.

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.