Solved

Embedd Image in Html file

Posted on 2009-05-20
12
200 Views
Last Modified: 2013-12-25
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
0
Comment
Question by:tia_kamakshi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
  • 2
  • +2
12 Comments
 
LVL 9

Expert Comment

by:hmare
ID: 24433256
What are you using for an email client?
0
 
LVL 36

Expert Comment

by:Loganathan Natarajan
ID: 24433261
What do you want to do exactly?

Do you want to design html newsletter like?
0
 

Author Comment

by:tia_kamakshi
ID: 24433390
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
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 17

Expert Comment

by:OmniUnlimited
ID: 24439130
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

0
 

Author Comment

by:tia_kamakshi
ID: 24439710
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
0
 
LVL 17

Accepted Solution

by:
OmniUnlimited earned 500 total points
ID: 24439994
You need a source from which you get your images.  Where are the images stored that you want to send via email?
0
 

Author Comment

by:tia_kamakshi
ID: 24440308
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
0
 
LVL 17

Assisted Solution

by:OmniUnlimited
OmniUnlimited earned 500 total points
ID: 24441409
Oh!  Now I know what you are meaning!

Does this look like what you need?
http://aspalliance.com/1354_Sending_HTML_Mail_with_Embedded_Image_in_NET.all#Page8
0
 
LVL 36

Expert Comment

by:Loganathan Natarajan
ID: 24442798
0
 
LVL 3

Expert Comment

by:crittle1
ID: 24447227
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.
0
 

Author Closing Comment

by:tia_kamakshi
ID: 31583567
Thanks
0
 
LVL 17

Expert Comment

by:OmniUnlimited
ID: 24495382
Glad the answer worked for you! ;)
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
FAQ pages provide a simple way for you to supply and for customers to find answers to the most common questions about your company. Here are six reasons why your company website should have a FAQ page
The viewer will learn how to count occurrences of each item in an array.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question