NULL
NULL

Reputation: 1589

send email with url image

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.

Upvotes: 0

Views: 1264

Answers (2)

rrrfusco
rrrfusco

Reputation: 1119

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">';

Upvotes: 0

Sarfraz
Sarfraz

Reputation: 382696

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" />;

Upvotes: 1

Related Questions