将此页面邮寄给您的朋友 [英] Mail this page to your friend

查看:106
本文介绍了将此页面邮寄给您的朋友的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的网页中提供该选项,将此表格作为您的电子邮件ID发送给您的朋友.

喜欢此链接


请帮帮我.

I want to give the option in my webpage send this article to your friend as form your email Id.

like this link


please Help me.

推荐答案

没有任何魔术按钮,但这是我要采用的方法:

1)创建一个单独的MasterPage文件,该文件用于呈现页面以用于电子邮件目的.您需要用它来呈现页面并捕获输出(aspx页面不是html页面).

2)当他们单击按钮时,请使用他们提供的电子邮件地址来创建邮件.通过使用专用于电子邮件的MasterPage呈现的URL来请求页面.使用WebClient下拉页面并将其用作电子邮件的内容.使用页面标题作为电子邮件的主题.

3)确保所有图像路径都呈现为绝对而非相对链接(简单),或嵌入所有图像并将其烘焙到电子邮件中(更难).

4)确保包含一个链接,以免日后收到来自您站点的电子邮件(为他们提供选择退出的选项).

干杯.
There''s no magic button for this, but here''s the approach I would take:

1) Create a separate MasterPage file that is used to render the page for the purpose of email. You''d need this in order to render the page and capture the output (aspx pages are not html pages).

2) When they click the button, use the email address they have provided to create a mail message. Request the page through an url that renders it with the MasterPage dedicated to email. Use WebClient to pull down the page and use that as the content of the email. Use the title of the page as the subject of the email.

3) Make sure that all the image paths are rendered as absolute and not relative links (easy), or embed all images and bake them into the email (harder).

4) Make sure you include a link to not receive future emails from your site (give them an opt-out option).

Cheers.


这篇关于将此页面邮寄给您的朋友的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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