如何自定义发送给用户的电子邮件?
我目前已经在 ASP.NET 中设置了一个基本的会员系统,并使用了 来
<asp:PasswordRecovery ID="PasswordRecovery1" Runat="server"></asp:PasswordRecovery>
处理密码恢复,这非常有效,但是如何自定义电子邮件,例如更改“主题”和电子邮件的实际正文内容-邮件 ?
I have currently setup a basic membership system in ASP.NET and have used the
<asp:PasswordRecovery ID="PasswordRecovery1" Runat="server"></asp:PasswordRecovery>
To deal with the password recovery, Which Works great but how would one customise the e-mail such as changing the"Subject" and the actual body content of the e-mail ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
为密码恢复控件实现 OnSendingMail 事件。
参数 (MailMessageEventArgs e) 是 MailMessage 对象,您可以在消息实际发送之前更新主题/正文等字段。
Implement the OnSendingMail event for the passwordrecovery control.
the parameter (MailMessageEventArgs e) is the MailMessage object and you can update the subject/body etc fields before the message is actually sent.
请在此链接查看大卫·温彻斯特的回答
https://forums.asp.net/post/3167737.aspx
我已经将他的答案编辑如下:
PasswordRecoveryMail.htm 文件的内容
Please see David Winchester's answer at this link
https://forums.asp.net/post/3167737.aspx
I've edited his answer as following:
Content of PasswordRecoveryMail.htm file
您可以编辑 MailDefinition 设置。
You can edit the MailDefinition settings.