[英]asp.net formatting an email
I am working on an application that involves the user clicking on a hyperlink to popup an outlook email template. 我正在开发一个应用程序,涉及用户单击超链接以弹出Outlook电子邮件模板。 I have the SendTo values, and the subject values.
我有SendTo值和主题值。 How do I enter text into the body of the email?
如何在电子邮件正文中输入文字?
In the hyperlink you can add the ?body=
variable after the email address. 在超链接中,您可以在电子邮件地址后添加
?body=
变量。 Formatting the body will be a challenge because for symbols like spaces you have to use hex codes (space = %20
, newline = %0D
). 格式化正文将是一个挑战,因为对于像空格这样的符号,您必须使用十六进制代码(空格=
%20
,换行符= %0D
)。 I don't know what your design criteria are, but most of the time I prefer to create a form with the desired input fields and let .NET handle the sending of the e-mail message on the submit. 我不知道你的设计标准是什么,但大多数时候我更喜欢用所需的输入字段创建一个表单,让.NET处理在提交上发送电子邮件的情况。
你在找这个吗?
<a href="mailto:person@test.com?subject=x&body=y">...</a>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.