This topic is locked

Add Image to HTML Email?

6/21/2010 3:07:58 PM
PHPRunner General questions
D
DigitalDean8 author

I would like to "dress up" my auto generated emails a bit by including some images in them. I am not quite getting the syntax correct for embedding the image URL into the HTML message body. Can someone help me with the correct syntax for adding a graphic image to emails?
thanks

Dean

A
ann 6/22/2010

Dean,
it's usual HTML code inside quotes in the message. Here is a sample:

$message="Hello there\n<b>Best regards</b><img src='images/pict.png' width='189' height='255' alt='image'>";



then send HTML email using this code:

runner_mail(array('to' => $email, 'subject' => $subject, 'htmlbody' => $message, 'charset' => 'UTF-8'));