refiking Posted April 27, 2008 Share Posted April 27, 2008 How can I send a picture in the email. So far it just sends the code, not what the code is saying to do. Here is my script as is: <? $message = "<img src='mia.gif' border='0'>"; $from = "[email protected]"; $headers = "From: $from\n"; $to = "[email protected]"; if (@mail($to, $subject, $message, $headers)) { // Give a success notice echo "Message sent."; echo "</center>\n"; echo "</body>\n"; echo "</html>\n"; exit; // Give an error that message can't be sent } else { $error = "Sorry, there was an error while trying to send the message - please try again later."; } Link to comment https://forums.phpfreaks.com/topic/103180-sending-an-email-with-a-picture-using-php/ Share on other sites More sharing options...
ohdang888 Posted April 27, 2008 Share Posted April 27, 2008 do it in html... the people can only see it if they can view html messages. Link to comment https://forums.phpfreaks.com/topic/103180-sending-an-email-with-a-picture-using-php/#findComment-528520 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.