如何将网页作为电子邮件发送? [英] How To send Webpage as Email Message?

查看:261
本文介绍了如何将网页作为电子邮件发送?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想发送电子邮件,它的内容应该是设计良好的aspx页面.但是,aspx页面不应该作为超链接发送,而应该显示为消息内容?

I want to send Email and it's Content should be a well Designed aspx Page. But the aspx page should not be sent as a Hyper-Link it should be shown as message Content?

如果建议您可以,请回复...

Can It is Possible if ay suggession Please Reply...

穆罕默德

推荐答案

您可以使用如下Web请求将页面的html转换为字符串:

you can get the html of the page into a string with a web request like this:

WebRequest request;
string text;
        string url = "UrlToGet";
        request = (HttpWebRequest)
            WebRequest.Create(url);
        using (WebResponse response = request.GetResponse())
        {
            using (StreamReader reader =
                new StreamReader(response.GetResponseStream()))
            {
                text = reader.ReadToEnd();
            }
        }

这篇关于如何将网页作为电子邮件发送?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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