Operating System - HP-UX
1752288 Members
4539 Online
108786 Solutions
New Discussion юеВ

how to attach a image for my html mail?

 
yan.f_1
Occasional Contributor

how to attach a image for my html mail?

hi all,
First, thanks Laurent, Satish, Stenfan.
now i can send a mail in html using sendmail command.
But a new problem appears, there is some pictures in my html. So i don't know how to send attachment JPG file and my html mail together.
Who knows, tell me please!
Mr.Wrong
3 REPLIES 3
Stefan Farrelly
Honored Contributor

Re: how to attach a image for my html mail?

Hi,

now you want to send an html file and JPG's images at the same time. This is more difficult. There is no easy way to do this so that in your email you simply click on your html attachment and it will acces your JPG files, even if they are attached also.

You need to use a program to group together all your files, eg. tar, then email this as an attachment, then if you have winzip installed you can use it to unpack the files to a directory somewhere, then clock on the html file in that directory, and as long as your html code is written to look for your JPG files in the same directory it will work, but maybe not.

So, on your HP server use tar to bundle up all your files, eg;
XX.html
X1.JPG
X2.JPG
tar cf tt.tar X*
Then uuencode tt.tar tt.tar | mailx -s"

Then in your mail program you will have a single attachment, tt.tar (which should show up as type winzip as long as you have winzip installed). Click on it, winzip will open, save all 3 files to the same directory somewhere, then from explorer click on the html file and see if it loads aok and displays the JPG files also.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Tech Support_1
Occasional Advisor

Re: how to attach a image for my html mail?

Just looking at your problem from a different perspective. I send a monthly newsletter (mailbomb) in html, my links to images, actually refer to images sitting on a web server, that way I only have to send the html. eg


Apathy is ..................
Sridhar Bhaskarla
Honored Contributor

Re: how to attach a image for my html mail?

Browsers display images in html files though
tag. We need to specify the location of the file in img src tag like . It is really dependent on the browser and the mail client. Yahoo,hotmail etc., can display the images as they can reference the images attached on the mailservers themselves. However if you attach an image, there will no such arrangment at the receiving mail server end to display your message.

So, I am afraid, I have to disappoint you.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try