Jump to content

sending mail, comes as a .dat attachement


jesushax

Recommended Posts

Hi, as above

 

when using the below sendmail code

 

the email comes to my inbox with the correct subject then the rest comes as a .dat attachment, anyone tell me why?

 

Cheers

 

$to = "$Email";
$subject = "Construction Works: Your New Password";
$message = "
<html>
<head>
<title>Reset Password</title>
</head>
<body>
<p>
Your password for the CW Services Ltd Website Has been reset to the following</p>
<p>Your Username is: $Username</p>
<p>Your New Password is: $password</p>
<p>To change your password please login and go to the My Details section of the site and change your password there.<br/>
CW Marketing Services Team</p>
</body>
</html>
";// Always set content-type when sending HTML email
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";// More headers

mail($to,$subject,$message,$headers);

 

 

Link to comment
https://forums.phpfreaks.com/topic/114232-sending-mail-comes-as-a-dat-attachement/
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.