邮件正文中的图像链接 [英] image link in mail body

查看:71
本文介绍了邮件正文中的图像链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



有人能告诉我在邮件正文中发送图片链接的单行代码,例如批准和拒绝我可以发送图片作为链接吗?

Hi,
Can anyone show me the single line code to send image link in mail body,e.g for approve and disapprove can i send images as a link?

推荐答案

只需将电子邮件MailMessage.IsBodyHtml设置为true,然后在邮件正文中输入图像URL的HTML:

Just set the email MailMessage.IsBodyHtml to true, and enter the HTML for the image url in the message body:
<img style="border: none;" src="http://www.MyDomain.com/Resources/Images/MyImage.png" width="99" height="32" alt="The image cannot be displayed" />







我喜欢发送,

string app =超链接;

并在邮件body.it中附加此字符串适用于文本,但如何使用图像而不是文本,如''点击这里''?




只需使用外围的链接代码:




"m sending like,
string app= hyperlink;
and attaching this string in mail body.it works for text but how to use image instead of text like ''click here''?"


Just use the link code round the outside:

<a href="http://www.MyDomain.com">
   <img style="border: none;" 

        src="http://www.MyDomain.com/Resources/Images/MyImage.png" width="99" height="32"

        alt="Click Here!" />
</a>

看看这个工作示例: http://www.w3school s.com/tags/tryit.asp?filename=tryhtml_image_link [ ^ ]

Have a look here for a working example: http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_image_link[^]


这篇关于邮件正文中的图像链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆