This topic is locked
[SOLVED]

 image in html email

6/5/2016 12:19:53 PM
PHPRunner General questions
Y
YCH author

I have an Edit Page, with some fields .
On this page also a field of type 'text' named "imgtext"
In this field I write html code for an image as eg. : [size="2"]<img src:"https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=23890&image=1&table=forumtopics"/>[/size]
[size="2"]I wouldlike to send a html e-mail with the image visible in the email body.[/size]
So for now I've put this code in the 'after record updated' event.
**
$subject= [size="2"]$values["subject"];[/size]
$email=$values["email"];
$body="Here is my image \n". $values["imgtext"];
$ret =runner_mail(array('to' => $email, 'subject' => $subject, 'htmlbody' =>$body, 'charset' => 'UTF-8'));
[size="2"]if($ret["mailed"])[/size]
{ echo"email was sent";
}
if(!$ret["mailed"])
{ echo $ret["message"];
}
return true;

The email is sent but the picture does not appear in the email!.
I checked the manual on sending email but could not find a clear answer on this specific topic including images in html email.
What am Imissing ? Any help is welcome.

Sergey Kornilov admin 6/6/2016

Make sure that you are forming a proper <img> tag with full URL of image file.
An example:

<img src="https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=79507&image=1&table=forumreplies">;
Y
YCH author 6/7/2016



Make sure that you are forming a proper <img> tag with full URL of image file.
An example:

<img src="https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=79514&image=1&table=forumreplies">;



Sergey

This is exactly what I was doing, the email is sent but I can not find any message in my Outlook IN box.
In the meantime have found the issue . As I was using little body text and just an image in the email message, Outlook considered the message through it's security filter as SPAM and put the message directly in the 'unwanted email' folder.