views:

68

answers:

2

i am including a path to an image like this:

$msg.='<img src="http://my.test.ca/images/show.jpg" width="75" height="75" />'

in my sendmail function.

the path works and the image is in the specified folder.

here is what happens to the image src when i get the email:

http://my.test.ca/images/sh%20w.jpg

it sorts of breaks the image. any ideas why.

+1  A: 

Most likely, there is an space in the image name:

sho w.jpg

instead of:

show.jpg

%20 means space which is auto-detected. So, make sure that there is no space in the file name.

Also i wonder why you are not using the <> tags when specifying image?

$msg.='(img src="http://my.test.ca/images/show.jpg" width="75" height="75" /);

Instead of:

$msg.='<img src="http://my.test.ca/images/show.jpg" width="75" height="75" />;
Sarfraz
there is no space as i rename the image in photoshop for that reason and visited the url to make sure its there.
Menew
A: 

Is the string written properly? With a single quote and a semi-colon at the end?

$msg .= '(img src="http://my.test.ca/images/show.jpg" width="75" height="75" /)';

Update
Try :

$msg .= '<img src="http://my.test.ca/images/show.jpg" width="75" height="75">';
rrrfusco
yes, its written properly. i even rename the image in photoshop. hmm
Menew