如何在C#中使用asp.net通过电子邮件发送主页 [英] How to send a home page via email using asp.net with c#

查看:85
本文介绍了如何在C#中使用asp.net通过电子邮件发送主页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用带有c#的asp.net通过电子邮件发送主页?

谢谢!

how to send a home page via email using asp.net with c# ?

Thanks!

推荐答案

整个主页."

好的-愚蠢的主意,一封电子邮件让我感到不胜其烦,而不是整个页面,而没有任何有关他们为什么向我发送我可以轻松获得的东西的相关信息,但是...

您所要做的只是将MailMessage.IsBodyHtml属性设置为true,并将页面的html源作为正文包含在内.您可能无法使用母版页等(我从未尝试过,但是由于电子邮件很可能是在专有窗口而不是浏览器中查看的,因此可能无法使用).

我一直从我的网站以电子邮件形式发送HTML片段:使用C#发送带有或不带有附件的电子邮件:通用例程. [
"An entire home page."

OK - silly idea, little in an email annoys me more than the whole page without any relevant info as to why they are sending me something I could easily get if I wanted too, but...

All you have to do is set the MailMessage.IsBodyHtml property to true, and include the html source of your page as the body text. You probably can''t use master pages and so forth (I''ve never tried, but it probably won''t work since the email may well be viewed in a proprietary window rather than a browser).

I send Html fragments as Email from my website all the time: Sending an Email in C# with or without attachments: generic routine.[^]


检查此链接

在asp.net中发送电子邮件 [在asp.net中发送电子邮件 [如何通过asp.net发送电子邮件 [ ^ ]

最好的
戈皮纳特·纳塔拉让(Gopinath Natarajan)
Check this links

sending email in asp.net[^]

send email in asp.net[^]

How to send email through asp.net[^]

All the Best
Gopinath Natarajan


这篇关于如何在C#中使用asp.net通过电子邮件发送主页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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