Jump to content

mail() acting up


tleisher

Recommended Posts

Why would this code print the message twice in the mail:

[code=php:0]$from = "forgotten@".$hostname;
            $to = $lost_email;
            $subject = "Password Reminder From ".$hostname;
           
            $headers = "MIME-Version: 1.0\r\n".
          "Content-type: text/html; charset=iso-8859-1\r\n".
          "From: \"Password Reminder\" <".$from.">\r\n".
          "To: \"User\" <".$to.">\r\n".
         
          # Mail message
         
          $message = "
            Someone (hopefully you) requested that your password be reset, if you received this in error please e-mail your
            admin at " . $author_email . "<br /><br />You're new password is: " . $n_pass;
           
            $response = mail($to, $subject, $message, $headers); 
[/code]

Returns this in the email:

[quote] Someone (hopefully you) requested that your password be reset, if you received this in error please e-mail your admin at *******

You're new password is: ******* Someone (hopefully you) requested that your password be reset, if you received this in error please e-mail your admin at *******

You're new password is: *******[/quote]
Link to comment
https://forums.phpfreaks.com/topic/19478-mail-acting-up/
Share on other sites

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.