Click here if you want to put your adv here

English

技 術 支 援

ASP發送E-mail參考代碼:

Dim Sender
Dim Title
Dim Recipient
Dim Bodys
Dim myMail

Sender = Request.form("")
Title = Request.form("")
Recipient = Request.form("")
Bodys = Request.form("")

Set myMail = CreateObject("CDONTS.NewMail")
myMail.From=Sender
myMail.Subject=Title
myMail.BodyFormat=0
myMail.MailFormat=0
myMail.To=Recipient
myMail.Body=Bodys
myMail.Send
Set myMail = Nothing


ASP.NET發送E-mail參考代碼:

C#

using System.Web.Mail;  
public void sendMail()  
{
try
   {
System.Web.Mail.MailMessage myMail=new MailMessage();
myMail.From = "myaccount@test.com";
myMail.To = "myaccount@test.com";
myMail.Subject = "MailTest";
myMail.Priority = MailPriority.Low;
myMail.BodyFormat = MailFormat.Text;
myMail.Body = "Test";
SmtpMail.SmtpServer="smarthost"; //your smtp server here
SmtpMail.Send(myMail);
   }

catch(Exception e)
  {
throw e;
  }
}

詳細信息請查看MSDN

服務熱線 2 5 2 8 3 2 5 3 星期一至六
電子郵件 support@webhost.com.hk
service@webhost.com.hk

Click here if you want to put your adv here
(C)2002Web Host Ltd. All rights Reserved
尊重智慧財產權 請勿任意轉載

Web Host Limited