Import Namespace System.ASP.Util Dim myMessage As New MailMessage
Dim myMail As New SmtpMail myMessage.From = "[email protected]"
myMessage.To = "[email protected]"
myMessage.Subject = "Great News"
myMessage.Body = ".NET rocks"
myMail.Send (myMessage)
End Subor
System.Web.Util.SmtpMail.Send(fromemail, toemail, subject, body);
Dim myMail As New SmtpMail myMessage.From = "[email protected]"
myMessage.To = "[email protected]"
myMessage.Subject = "Great News"
myMessage.Body = ".NET rocks"
myMail.Send (myMessage)
End Subor
System.Web.Util.SmtpMail.Send(fromemail, toemail, subject, body);
解决方案 »
- DevExpress GridControl 统计取值问题
- C#智能设备项目--条码扫描的问题
- visual studio有windows7 64位的安装包吗
- 定义Lable数组是这样定义的吗? Label[] l = new Label();
- C/S结构如何与webservice进行通讯
- windows2008和.net2003c#开发程序的问题
- 一个关于SQL外键约束的问题
- (急)關于設置DGV中的各欄的ReadOnly,為何設了無效?
- 请问如何给自动生成的按钮改变图片呢?
- 求在c1Grid中进行查询,新增,修改,删除的例子
- 有谁能解释一下在Beta2中dataSet和DataView两个控件的做用是什么。
- c#和vc.net有什么关系吗?
MailMessage mailObj AS new MailMessage();
mailObj.From = "...";
mailObj.To = "...";
mailObj.Subject = "...";
mailObj.Body = "...";
SmtpMail.Send(mailObj);
我SMTP开了,是不是还要设置什么东东阿?
1. Use CDONTS.DLL
first reference the cdonts.dll in the winnt\system32
CDONTS.NewMail newMail = new CDONTS.NewMail();
newMail.BodyFormat = 0; //CdoBodyFormatHTML
newMail.MailFormat = 0; //CdoMailFormatMime
newMail.Send("[email protected]","[email protected]", "Hello","Test", 1); //CdoNormal Priority2. Use STMP.Send
Reference System.Web
using System.Web.Mail;
System.Web.Mail.SmtpMail.SmtpServer="stmp.abc.com";
System.Web.Mail.SmtpMail.Send(strFrom,strTo,strTitle,strBody);if you donot set SmtpServer property, the mail will be queued on local machine.