我现在想写一个通用的函数,通过参数得到邮件的信息,然后启动outlook界面自动填入内容。
我在windows程序里面,可以通过process.start("mailto:*****")实现,但是在web里面怎么实现?
虽然我知道通过<a href="mailto:****>mail</a>就可以了,但是我希望通过后台的程序实现而不是前台的超级链接。
我在windows程序里面,可以通过process.start("mailto:*****")实现,但是在web里面怎么实现?
虽然我知道通过<a href="mailto:****>mail</a>就可以了,但是我希望通过后台的程序实现而不是前台的超级链接。
解决方案 »
- 为什么我的视频上传到服务器上会出现please contact the application support team for more informatio
- 写SqlParameter的编写效率问题
- 请教大家的问题,发布asp.net项目时,服务器本身运行都正常,其它机器浏览时就不能正常显示了。为什么?我把script都做成了内嵌资源文件
- 怎样插入gif文件?
- 发一个完整的用C#编的添加、修改、删除数据web程序
- 请问如何在线打开冲数据库中取出的Office文档
- 如何用Response.Write()写链接地址
- WEB开发中使用js面临的安全性问题,请大家畅所欲言
- 用程序上传视频到指定视频网站上
- 请问怎样用正则表达式或其它方法实现以下?
- vs2005 TFS中有没有bug管理系统啊?
- 求一正则表达式,既可以满足两位小数的正实数,也可以满足千分位分割的两位小数的正实数
Imports System.Net.Mail
Imports System.Net.Configuration
Imports System.Configuration
Imports System.Configuration.ConfigurationManager
Imports System.Web.Configuration<system.net>
<mailSettings>
<smtp deliveryMethod="Network" from="">
<network host="smtp.263xmail.com" userName="" password=""/>
</smtp>
</mailSettings>
</system.net>subject,body 是asp:textbox
mailto 是 appSettings中的配置
Dim ToAddress As String = System.Configuration.ConfigurationManager.AppSettings("mailto").ToString
using As New MailMessage(NetSectionGroup.GetSectionGroup(WebConfigurationManager.OpenWebConfiguration("~/web.config")).MailSettings.Smtp().From, ToAddress, subject.Text, body.Text)
Dim smtp As New SmtpClient
smtp.Send(mail) end using
需要后台实现什么?
如果用后台发邮件的话直接可以用微软的SMTP类去发送邮件啊,不一定要打开Outlook才能发邮件的。
private void page_load(...)
{
button1.Attributes.Add("onclick", "window.open('mailto:[email protected]')");
}
又或者RegisterClientScriptBlock(..)