tia_kamakshi
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
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
What are you using for an email client?
What do you want to do exactly?
Do you want to design html newsletter like?
Do you want to design html newsletter like?
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
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">
ASKER
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
How should we send html mails with images now
Thanks again
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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_R elated_Bou ndary"
--MIME_Multipart_Related_B oundary
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_B oundary
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/4AAQSkZJRgABAQEAYwBjAA D/4QAWRXhp ZgAATU0AKg AAAAgAAAAA AAD//gAXQ3 JlYXRl
ZCB3aXRoIFRoZSBHSU1Q/9sAQw ABAQEBAQEB AQEBAQEBAQ EBAQEBAQEB AQEBAQEBAQ EBAQEB
AQEBAQEBAQEBAQEBAQEBAQEBAQ EBAQEBAQEB AQEB/9sAQw EBAQEBAQEB AQEBAQEBAQ EBAQEB
Lb3xUqFRRk4xS7EWpbbkiy/zIK Oj4fHFWKsY Ujs90jJewE TFzkvVkaZ4 +bSPVW6j2F jwp5Cq
ADx2LEqPgE9vkHnWUsxA7BNvzJ tW0Pa4xBNW e6lDajMUZ1 islW7spoie r+JUjjHNNN NaNSem
mmmjRppppo0aaaaaNGmmmmjRr/ /Z
--MIME_Multipart_Related_B oundary
Content-Type: image/gif;
name="Second_image_file_na me.gif"
Content-Transfer-Encoding: base64
Content-ID: <My_second_image>
Content-Disposition: inline;
filename="Second_image_fil e_name.gif "
/9j/4AAQSkZJRgABAQEASABIAA D/4QAWRXhp ZgAATU0AKg AAAAgAAAAA AAD//gAXQ3 JlYXRl
ZCB3aXRoIFRoZSBHSU1Q/9sAQw ABAQEBAQEB AQEBAQEBAQ EBAQEBAQEB AQEBAQEBAQ EBAQEB
AQEBAQEBAQEBAQEBAQEBAQEBAQ EBAQEBAQEB AQEB/9sAQw EBAQEBAQEB AQEBAQEBAQ EBAQEB
AQEBAQEBAQEBAQEBAQEBAQEBAQ EBAQEBAQEB AQEBAQEBAQ EBAQEBAQEB AQEB/8AAEQ gAMgGy
B70pSswaPcqq2hakrKGVrfBVgC pBkTIIOQQf aDUD2FDDFq l2YoYoydPc EpGiEj0i2O CVAJGf
ZSlWtSXH4BbFKUqAKqrf0MMuo2 RlhikIssAy Ro5A68pwCw JAz7KUq4Xv h7QPK0jjFr bAIgAt
4QAFUAARqAAAMAAdgB5UpStQf/ /Z
--MIME_Multipart_Related_B oundary--
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
here the message body should start with
The message body would start with something like :
Content-Type: multipart/related;
boundary="MIME_Multipart_R
--MIME_Multipart_Related_B
Content-type: text/html; charset=utf-8; format=flowed
Content-Transfer-Encoding:
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_B
Content-Type: image/jpeg;
name="Image_file_name.jpg"
Content-Transfer-Encoding:
Content-ID: <My_image>
Content-Disposition: inline;
filename="Image_file_name.
/9j/4AAQSkZJRgABAQEAYwBjAA
ZCB3aXRoIFRoZSBHSU1Q/9sAQw
AQEBAQEBAQEBAQEBAQEBAQEBAQ
Lb3xUqFRRk4xS7EWpbbkiy/zIK
ADx2LEqPgE9vkHnWUsxA7BNvzJ
mmmjRppppo0aaaaaNGmmmmjRr/
--MIME_Multipart_Related_B
Content-Type: image/gif;
name="Second_image_file_na
Content-Transfer-Encoding:
Content-ID: <My_second_image>
Content-Disposition: inline;
filename="Second_image_fil
/9j/4AAQSkZJRgABAQEASABIAA
ZCB3aXRoIFRoZSBHSU1Q/9sAQw
AQEBAQEBAQEBAQEBAQEBAQEBAQ
AQEBAQEBAQEBAQEBAQEBAQEBAQ
B70pSswaPcqq2hakrKGVrfBVgC
ZSlWtSXH4BbFKUqAKqrf0MMuo2
4QAFUAARqAAAMAAdgB5UpStQf/
--MIME_Multipart_Related_B
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.
ASKER
Thanks
Glad the answer worked for you! ;)