sending images in email

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
andylyon87
Forum Contributor
Posts: 168
Joined: Sat Jan 31, 2004 5:31 am
Location: Dundee

sending images in email

Post by andylyon87 »

Hi

i want to set a newsletter up, the content is going to beone image. How do I get this image to show on the email on hotmail and outlook. If anyone knows please tell, I have tried quite a bit.

I have tried <img src="">
would I need the full html tag body stuff

thanks
andylyon87
User avatar
n00b Saibot
DevNet Resident
Posts: 1452
Joined: Fri Dec 24, 2004 2:59 am
Location: Lucknow, UP, India
Contact:

Post by n00b Saibot »

what is it showing up as :?: is there broken image icon showing or the its showing as <img src=...> etc.

you have to set content-type to text/html to correct the second one and be forewarned - external images in the message are blocked by many of the email programs/services.
andylyon87
Forum Contributor
Posts: 168
Joined: Sat Jan 31, 2004 5:31 am
Location: Dundee

Post by andylyon87 »

nope it doesnt come up with a broken image icon, it comes up with the code!!!

tried the latter and that just showed the code again. Your recommendation of sayin declarin the type=text/plain how would you recommend I attach the file as well.

thanks for your help

andy
User avatar
n00b Saibot
DevNet Resident
Posts: 1452
Joined: Fri Dec 24, 2004 2:59 am
Location: Lucknow, UP, India
Contact:

Post by n00b Saibot »

andylyon87 wrote:Your recommendation of sayin declarin the type=text/plain
8O When did i recommend text/plain. text/plain is the cause of code showing up.

well first of all add the header "Content-Type:text/html" and then attach the img. i am sure the prob will be out for good ;)
andylyon87
Forum Contributor
Posts: 168
Joined: Sat Jan 31, 2004 5:31 am
Location: Dundee

Post by andylyon87 »

lol sorry, kk thanks
Post Reply