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: [email protected] 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
https://forums.phpfreaks.com/topic/82337-problems-with-php-mail-function/
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

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.

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.