and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Hello,
I am trying to enbed an image, and have it show up in the body of my email, is this possible.
Thanks in advance
$email_body = "
<html>
<head>
</head>
<body>
<p> Some Text </p>
<p>I WANT MY IMAGE To SHOW UP HERE</p>
</body>
</html>";
$message =& new Swift_Message("Subject", $email_body, "text/html");
$part =& new Swift_Message_Part("<img src=\"" . $message_to_user->attach(new Swift_Message_Image( new Swift_File("images/image.png"))) . "\" alt=\"Alt Text\" />" );
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
$message =& new Swift_Message("My subject");
$part =& new Swift_Message_Part("Here's an image <img src=\"" . $message->attach(new Swift_Message_Image(
new Swift_File("images/foo.png"))) . "\" alt=\"\" /> embedded");
$message->attach($part); // <--- This attaches the image into the end of the email, and then my email_body does not show up.
So what i need is to embed the image, and then somehow get the generated <img> tag with the embedded image ID and insert it into my message body.