dfowler Posted November 16, 2007 Share Posted November 16, 2007 Hey, I want to send an email using the mail() function but have it look nice. I was hoping to insert an image in the message and was wondering how I do this. Thanks for any help. Quote Link to comment Share on other sites More sharing options...
janim Posted November 16, 2007 Share Posted November 16, 2007 try something like : <?php // To send HTML mail, the Content-type header must be set $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; // Additional headers $headers .= 'From: Birthday Reminder <birthday@example.com>' . "\r\n"; $headers .= 'Cc: birthdayarchive@example.com' . "\r\n"; $headers .= 'Bcc: birthdaycheck@example.com' . "\r\n"; $to="you@site.com"; $sub="new msg"; $msg= ' <html> . //that means you can send regular html page with images ..etc . . </html> '; //send it here mail($to,$sub,$msg,$headers); ?> you can edit it Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.