📄 zujian.asp
字号:
<%
'=========================================================
' 『动感在线』版权所有(C) Donggan.Net
' 您可以自由应用本程序于合法的个人或商业行为。
' 您必须保留版权信息。
'=========================================================
' Version:1.3
' Date: 2002-12-13
' Script Written by xubin
'=========================================================
' Copyright (C) 1999-2002 Donggan.Net. All rights reserved.
' Web: http://www.Donggan.net
' Email: webmaster@Donggan.net,webmaster@mail.Donggan.net
'=========================================================
%>
<%
Sub sendmail()
'选择发送邮件组件
Select Case mailzj
Case "cdonts"
Set objMail = Server.CreateObject("CDONTS.NewMail")
objMail.From = FromMail
objMail.To = ToMail
If ToMailbcc <> "" Then objMail.Bcc = ToMailbcc
objMail.Subject = MailSubject
If MailFormat = "html" Then objMail.BodyFormat = 0
objMail.Body = MailBody
If Attachment <> "" Then objMail.AttachFile Attachment
objMail.MailFormat = 0
objMail.Importance = 2
objMail.send
Set objMail=nothing
Case "jmail"
Dim JMail
Set JMail=Server.CreateObject("JMail.Message")
JMail.Silent=TRUE
JMail.CharSet="gb2312"
'JMail.AddHeader "www.Donggan.net","Donggan_net"
JMail.From = FromMail
Jmail.FromName = FromName
JMail.Subject=MailSubject
JMail.AddRecipient ToMail
If ToMailcc <> "" Then JMail.AddRecipientCC ToMailcc
If ToMailbcc <> "" Then JMail.AddRecipientBCC ToMailbcc
If MailFormat = "html" Then
JMail.HTMLBody = MailBody
Else
JMail.Body = MailBody
End If
If Attachment <> "" Then JMail.AddAttachment(Attachment)
If URLAttachment <> "" Then JMail.AddURLAttachment URLAttachment
JMail.Priority = Priority
'If TimeMail Then JMail.DeferredDelivery = sendtime
If SMTPUser <> "" Then JMail.MailServerUserName = SMTPUser
If SMTPPass <> "" Then JMail.MailServerPassword = SMTPPass
If SMTPPass <> "" Then
JMail.SEnd("SMTPHost")
Else
JMail.SEnd("")
End If
ErrStr =JMail.errormessage
JMail.ClearAttachments
JMail.close
Set JMail=nothing
Case "aspemail"
Set Mail = Server.CreateObject("Persits.MailSEnder")
Mail.CharSet = "gb2312"
Mail.host = SMTPHost
Mail.From = FromMail
Mail.FromName = FromName
Mail.AddAddress ToMail
If ToMailbcc <> "" Then Mail.AddBcc ToMailbcc
Mail.Subject = MailSubject
Mail.Body = MailBody
If MailFormat = "html" Then Mail.IsHTML = TRUE
If Attachment <> "" Then Mail.AddAttachment Attachment
If SMTPUser<>"" Then Mail.Username = SMTPUser
If SMTPPass<>"" Then Mail.Password = SMTPPass
Mail.Priority = Priority
Mail.SEnd
Set Mail = Nothing
Case "aspmail"
Set Mailer = Server.CreateObject ("smtpsvg.mailer")
Mailer.CusTomCharSet = "gb2312"
Mailer.FromAddress = FromMail
Mailer.FromName = FromName
Mailer.AddRecipient ToMail, ToMail
If ToMailbcc <> "" Then Mailer.AddBCC ToMailbcc, ToMailbcc
Mailer.Subject = MailSubject
If MailFormat = "html" Then
Mailer.ContentType = "text/html"
Mailer.BodyText = MailBody
Else
Mailer.BodyText = MailBody
End If
If Attachment <> "" Then
Mailer.ClearAttachments
Mailer.AddAttachment Attachment
End If
Mailer.Priority = dengji
'If TimeMail Then
' Mailer.DateTime = WeekDayName(WeekDay(Date), TRUE) & ", " & Day(Date) & " " & MonthName(Month(Date), TRUE) & " " & Year(Date) & " " & FormatDateTime(Now, 4) & " -0600 (CST)"
'End If
Mailer.RemoteHost = SMTPHost
Mailer.Timeout = 9999
Mailer.SEndMail
ErrStr = Mailer.Response
Set Mailer = Nothing
Case "easywebmail"
Set mailsend = Server.CreateObject("easymail.MailSEnd")
mailsend.CreateNew FromMail, "temp"
mailsend.MailName = FromName
mailsend.EM_To = ToMail
If ToMailbcc <> "" Then mailsend.EM_Bcc ToMailbcc
mailsend.EM_Subject = MailSubject
If MailFormat = "html" Then
mailsend.EM_HTML_Text = MailBody
mailsend.useRichEditer = TRUE
Else
mailsend.EM_Text = MailBody
End If
mailsend.EM_Priority = webmailPriority
If TimeMail Then mailsend.EM_TimerSEnd = webmailtime
If Attachment <> "" Then mailsend.AddFromAttFileString = Attachment
If mailsend.SEnd() = FALSE Then
ErrStr= "有错误发生"
End If
Set mailsend = Nothing
Case "CMailServer"
Set objSMTP= CreateObject("CMailCOM.SMTP.1")
objSMTP.CreateUserPath("ASPMail")
objSMTP.Subject = MailSubject
objSMTP.Body = MailBody
objSMTP.To = ToMail
'If ToMailbcc <> "" Then objSMTP.Bcc ToMailbcc
objSMTP.From = FromMail
objSMTP.SEndMail
If Left(objSMTP.LastResponse, 3) <> "+OK" Then
ErrStr= "错误原因:"&objSMTP.LastResponse
End If
Set objSMTP = Nothing
Case Else
Response.Write "<script>alert('邮件组件设置错误!请返回重新设置!');this.location.href='management.asp';</script>"
Response.End
End Select
End Sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -