要用jmail 组件后才能使用哦.
Sub Jmail(email,topic,mailbody)
On Error Resume Next
Dim JMail
Set JMail=Server.CreateObject("JMail.Message")
JMail.silent=True
JMail.Logging=True
JMail.Charset="gb2312"
If Not(Newasp.MailUserName = "" Or Newasp.MailPassword = "") Then
JMail.MailServerUserName = Newasp.MailUserName '您的邮件服务器登录名
JMail.MailServerPassword = Newasp.MailPassword '登录密码
End If
JMail.ContentType = "text/html"
JMail.Priority = 1
JMail.MailDomain = "govery.cn"
JMail.From = Newasp.MailFrom '邮件地址
JMail.FromName = Newasp.SiteName '网站名称
JMail.AddRecipient email
JMail.Subject = topic
JMail.Body = mailbody
If Err <> 0 Then
SendMail="False"
Else
JMail.Send (Newasp.MailServer) '发邮件服务器地址
JMail.ClearRecipients()
If Err <> 0 Then
SendMail="False"
Else
SendMail="OK"
End If
End If
Set JMail=nothing
End Sub