Solved

Embedd Image in Html file

Posted on 2009-05-20
12
199 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

Is Your DevOps Pipeline Leaking?

Is your CI/CD pipeline a hodge-podge of randomly connected tools? You’ve likely got a tool to fix one problem & then a different tool to fix another, resulting in a cluster of tools with overlapping functionality. Learn how to optimize your pipeline with Gartner's recommendations

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.
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

734 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