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. Link to comment https://forums.phpfreaks.com/topic/77655-solved-insert-image-with-mail/ 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 <[email protected]>' . "\r\n"; $headers .= 'Cc: [email protected]' . "\r\n"; $headers .= 'Bcc: [email protected]' . "\r\n"; $to="[email protected]"; $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 Link to comment https://forums.phpfreaks.com/topic/77655-solved-insert-image-with-mail/#findComment-393170 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.