用 ASP.Net 发Email
来源:互联网 发布:mac怎么打特殊符号 编辑:程序博客网 时间:2024/05/16 05:03
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Web.Mail;
namespace PWDGet
{
/// <summary>
/// Summary description for passwordGet.
/// </summary>
public class passwordGet : System.Web.UI.Page
{
protected System.Web.UI.WebControls.Panel PanelError;
protected System.Web.UI.WebControls.Panel panelMessage;
private void Page_Load(object sender, System.EventArgs e)
{
if(!this.IsPostBack)
{
try
{//send Email code
MailMessage Mail=new MailMessage();
Mail.From =strFromMan;
Mail.To = strToMan;
Mail.Subject =" ASC Wines Password Assistance";
Mail.Body ="<html><head> <body>message</body></html>";
Mail.BodyFormat=MailFormat.Html;
Mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1");
Mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername","test");//这里填写你邮箱的用户名
Mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword","ssbgroup");//你邮箱的密码
SmtpMail.SmtpServer= "mail.ssbg.com.cn"; // 邮件服务器
SmtpMail.Send(Mail);
//Response.Write("succeed!...");
}
catch
{
this.PanelError.Visible = true;
this.panelMessage.Visible = false;
}
}
}
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
}
}
- 用 ASP.Net 发Email
- 用 ASP.Net 发Email
- 用 ASP.Net 发Email
- 用 ASP.Net 发Email
- ASP.net 调用 SMTP 发 Email? 简单的不得了
- asp.net 发email实例 gmail html格式
- Asp 发Email (可以加发附件)
- 发用Email
- 用Spring发Email
- ASP.net发送Email
- asp.net 发送email
- ASP.net发送Email
- asp.net 发送Email
- ASP.net发送email
- ASP.NET发送EMAIL
- asp.net发送Email
- ASP.net发邮件的例程(Language:"C#"; 带EMail地址验证)-
- 使用.NET发送邮件 发送邮件,发邮件,EMail,SMTPMAIL,asp.net 选择自 kwklover 的 Blog
- 使用NUnit进行浮点数测试准则
- 在可执行jar中动态载入第三方jar
- Windows Mobile 开发书籍介绍
- 魔兽世界插件修改简单入手
- 中科院中文分词系统--字典结构
- 用 ASP.Net 发Email
- 从'地狱'升入'天堂'
- 如何快速地比较两数据库结构的差异
- 应用ITIL提升企业IT服务管理
- "CSDN F2F俱乐部Java系列活动——Java,2006谁与争锋"后续报道
- 关于聚集索引的工作体会
- 后英雄时代–接班,不要英雄,要制度
- C++中运算符优先级的学习注解
- qt for windows