Images don't appear in emails

五迷三道 提交于 2019-12-01 10:37:06

the images either need to be stored in a publicly accessible location with a full reference to the image <img src="http://my.domain.com/images/filename.ext" /> or the images need to be embedded into the email.

The reason behind the image is not show in email because email client cannot get path you specified.

For the solution you can do below

  1. First replace the simple image URL to publically access url [means if you copy the image URL in browser you can access the browser], make sure your image folder is out of authentication

As Jason said you have to put whole url, but if you put your image in App_Data they won't be accessible from outsite because this is a protected folder. You have another option to put images in mail, IMO this is a prefered way to put images in mail, e-mail client won't complain and ask for permission to display images. Here is a example how to do this

http://www.codeproject.com/KB/aspnet/EmbedImage.aspx

you can also use google picasa. upload the images to picasa, set the visibility to public, get in the album and on the right side you will have link to this photo link. press this link and chose the size you want it to be displayed, mark the image only check box and you will have a link ready to embed in to the mailer. put the link in the src and that is it.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!