I made a simple script for sending emails through a web page using sendmail. everything works fine but when I get the emails there are "!" (exclamation points) inserted in the text in random places. The mime type is html.
This is the function that creates and sends the email:
This is the function that creates and sends the email:
| Code: |
|
<?php function email($user_email,$message,$subject,$send,$whatform) { $from = "Agent-Updates@pantours.net"; $msg_body = '<html><body>'; $message = stripslashes($message); //strip slashes because of magic quotes $headers = "From: $from\n"; $headers .= "Content-type: text/html; charset=iso-8859-1"; $msg_body .= '<div style="width:500px; padding:15px; font-size:14px;">'; $msg_body .= "<p>".$message."</p>"; $msg_body .= '<p>If you no longer wish to receive emails from Pan Tours Hawaii, please click here</p>'; $msg_body .= '</div></body></html>'; /**** send email out ****/ if ( $send == "yes" ) { $sent = mail($user_email,$subject,$msg_body,$headers); return $sent; }else{ return $msg_body; } }//end email() function ?> |
