0

Possible Duplicate:
base64 encoded images in email signatures

I have a image stored in database.I need to to insert that image alongwith email signature wich is only text right now.I was planning to use image tag that will point to servlet as shown below which will internally fetch the image from database and send it as byte stream inside response. This approach works fine till i send the mail to the user in the same application . Because my application authenticate/entertains the request only if the request is coming from logged in user.So when i send the email to a person who also exist in my application and logged in can see the image(inserted with signature). Problem comes when user sends the mail to external domain like gmail.com, yahoo.com. So if i send the mail to gmail user, he can not see the image in signature as the servlet request sent by image tag will not be entertained as user does not belong to my application? I am not sure whats the best approach/way to insert the image in email signature?

img src="/path/toMyServlet.action"
Community
  • 1
  • 1
M Sach
  • 33,416
  • 76
  • 221
  • 314

1 Answers1

2

Instantly thought of base64 when I read your question however I certainly had problems with base64 images displaying in gmail in my last role so ended up not using it. I think the best solution would be to embed the image in the header of the email and both approaches are documented at base64 encoded images in email signatures.

Hope that helps

Community
  • 1
  • 1