Solved

Embedd Image in Html file

Posted on 2009-05-20
12
198 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
  • 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
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to combine and minify CSS and JS files 5 19
Filktering Alphabetically 8 32
Link failure 16 35
Understanding UserAgent String 2 17
Any business that wants to seriously grow needs to keep the needs and desires of an international audience of their websites in mind. Making a website friendly to international users isn’t prohibitively expensive and can provide an incredible return…
Color can increase conversions, create feelings of warmth or even incite people to get behind a cause. If you want your website to really impact site visitors, then it is vital to consider the impact color has on them.
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

830 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