Link to home
Start Free TrialLog in
Avatar of tia_kamakshi
tia_kamakshiFlag for United Arab Emirates

asked on

Embedd Image in Html file

Hi,

I want to embedd Image in HTML file.

How can I do that.

I need to send email with embeded image

So, I need to provide 3rd party application a html with html page

Please guide me to do so

Many Thanks
Avatar of hmare
hmare

What are you using for an email client?
Avatar of Loganathan Natarajan
What do you want to do exactly?

Do you want to design html newsletter like?
Avatar of tia_kamakshi

ASKER

It is a third party application, which reads xml and read html file location from xml file and to address etc and send mail

So I just wanted to pass the html file path in xml file to that application in some folder location

Therefore I need html file where images is embeded

Many Thanks for your response
A simple coding in your HTML file should do it.
<img src="http://yourwebsite.com/images/email_image.gif" alt="email image">

Open in new window

Thanks for your response. But I do not have any site to upload my images

How should we send html mails with images now

Thanks again
ASKER CERTIFIED SOLUTION
Avatar of OmniUnlimited
OmniUnlimited
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
No, I know it is possible

here the message body should start with

The message body would start with something like :
Content-Type: multipart/related;
 boundary="MIME_Multipart_Related_Boundary"

--MIME_Multipart_Related_Boundary
Content-type: text/html; charset=utf-8; format=flowed
Content-Transfer-Encoding: quoted-printable


html>

.. etc ..

then somewhere you would reference your images :

<img src="cid:My_image" />

...

<img src="cid:My_second_image" />

.. etc ..

then the HTML part would end, and the image parts
would start, with the images encoded in base64,
followed by the marker for the end of
the multipart/related section :

</html>

--MIME_Multipart_Related_Boundary
Content-Type: image/jpeg;
 name="Image_file_name.jpg"
Content-Transfer-Encoding: base64
Content-ID: <My_image>
Content-Disposition: inline;
 filename="Image_file_name.jpg"

/9j/4AAQSkZJRgABAQEAYwBjAAD/4QAWRXhpZgAATU0AKgAAAAgAAAAAAAD//gAXQ3JlYXRl
ZCB3aXRoIFRoZSBHSU1Q/9sAQwABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEB
AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEB/9sAQwEBAQEBAQEBAQEBAQEBAQEBAQEB
Lb3xUqFRRk4xS7EWpbbkiy/zIKOj4fHFWKsYUjs90jJewETFzkvVkaZ4+bSPVW6j2Fjwp5Cq
ADx2LEqPgE9vkHnWUsxA7BNvzJtW0Pa4xBNWe6lDajMUZ1islW7spoier+JUjjHNNNNaNSem
mmmjRppppo0aaaaaNGmmmmjRr//Z
--MIME_Multipart_Related_Boundary
Content-Type: image/gif;
 name="Second_image_file_name.gif"
Content-Transfer-Encoding: base64
Content-ID: <My_second_image>
Content-Disposition: inline;
 filename="Second_image_file_name.gif"

/9j/4AAQSkZJRgABAQEASABIAAD/4QAWRXhpZgAATU0AKgAAAAgAAAAAAAD//gAXQ3JlYXRl
ZCB3aXRoIFRoZSBHSU1Q/9sAQwABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEB
AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEB/9sAQwEBAQEBAQEBAQEBAQEBAQEBAQEB
AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEB/8AAEQgAMgGy
B70pSswaPcqq2hakrKGVrfBVgCpBkTIIOQQfaDUD2FDDFql2YoYoydPcEpGiEj0i2OCVAJGf
ZSlWtSXH4BbFKUqAKqrf0MMuo2RlhikIssAyRo5A68pwCwJAz7KUq4Xvh7QPK0jjFrbAIgAt
4QAFUAARqAAAMAAdgB5UpStQf//Z
--MIME_Multipart_Related_Boundary--

Of course this does not make a full e-mail, you need to add the proper
rfc-822 headers



But I am not able to get it done, so I posted the question.

Please comment
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
you can host your images on something like photobucket... AND it will automatically give you the link code to embedd the image too. Maybe that can get you started.
Thanks
Glad the answer worked for you! ;)