Page 1 of 1

Displaying Image in an Email-Body

Posted: Sun Mar 21, 2010 5:27 pm
by devarishi
Hi,


Please consider the PHP Script given below. When email is received no image is displayed in the body of the message. I have tested it by sending an email to my yahoo id as well as to our internal domain on Lotus Notes client.

Code: Select all

<?php
 
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= "From: Test Mail<info@company.com>;" . "\r\n";
 
$message = "<p>Testing Image <p> <img src='contact.jpg' />";
 
$status = @mail("users@company.com,someUser@yahoo.com","Test", $message, $headers);
?>

So, how can we get images displayed in an email-body with advanced / graphics features enabled?


Note: Only an icon with a X is displayed.

Re: Displaying Image in an Email-Body

Posted: Sun Mar 21, 2010 5:42 pm
by requinix

Code: Select all

<img src='contact.jpg' />
So how is the email client supposed to know where this image is?

Re: Displaying Image in an Email-Body

Posted: Sun Mar 21, 2010 6:37 pm
by devarishi
tasairis wrote:

Code: Select all

<img src='contact.jpg' />
So how is the email client supposed to know where this image is?
DevNet Master has rightly been designated to your name. :lol: :bow:

Just one point: Now image is being displayed in my yahoo email but not in Lotus Notes Client. Well, I checked on outlook web also and it displays some security warning but then we can enable display of images. So, I think Lotus Notes has some features / settings that need to be corrected.

By the way, thanks again!

This is how I corrected the line (as hinted by you):
tasairis wrote:

Code: Select all

<img src='Fully Qualified URL/contact.jpg' />