⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 email.asp

📁 基于asp的 班级同学录主页源代码
💻 ASP
字号:
<%
Function IsEmail(sCheckEmail)
Dim sEmail, nAtLoc
IsEmail = True
sEmail = Trim(sCheckEmail)
nAtLoc = InStr(1, sEmail, "@") 'Location of "@"

If Not (nAtLoc > 1 And (InStrRev(sEmail, ".") > nAtLoc + 1)) Then
IsEmail = False
ElseIf InStr(nAtLoc + 1, sEmail, "@") > nAtLoc Then
IsEmail = False
ElseIf Mid(sEmail, nAtLoc + 1, 1) = "." Then
IsEmail = False
ElseIf InStr(1, Right(sEmail, 2), ".") > 0 Then
IsEmail = False
End If
End Function
%>
<%
sub aspmail()
Set objNewMail = Server.CreateObject("SMTPsvg.Mailer")
objNewMail.FromName = sysname
objNewMail.FromAddress = systememail
'objNewMail.AddReplyTo = systememail
objNewMail.RemoteHost = strMailServer
objNewMail.AddRecipient username, email
objNewMail.Subject = topic
objNewMail.BodyText = mailbody
on error resume next '## Ignore Errors
SendOk = objNewMail.SendMail
If not(SendOk) <> 0 Then
Err_Msg = Err_Msg & "<li>Your request was not sent due to the following error: " & objNewMail.Response & "</li>"
End if
Set objNewMail = Nothing
end sub
sub aspemail()
Set objNewMail = Server.CreateObject("Persits.MailSender")
objNewMail.FromName = sysname
objNewMail.From = systememail
objNewMail.AddReplyTo systememail
objNewMail.Host = strMailServer
objNewMail.AddAddress email, username
objNewMail.Subject = topic
objNewMail.Body = mailbody
on error resume next '## Ignore Errors
objNewMail.Send
If Err <> 0 Then
Err_Msg = Err_Msg & "<li>Your request was not sent due to the following error: " & Err.Description & "</li>"
End if
Set objNewMail = Nothing
end sub
sub aspqmail()
Set objNewMail = Server.CreateObject("SMTPsvg.Mailer")
objNewMail.QMessage = 1
objNewMail.FromName = sysname
objNewMail.FromAddress = systememail
objNewMail.RemoteHost = strMailServer
objNewMail.AddRecipient username, email
objNewMail.Subject = topic
objNewMail.BodyText = mailbody
on error resume next '## Ignore Errors
objNewMail.SendMail
If Err <> 0 Then
Err_Msg = Err_Msg & "<li>Your request was not sent due to the following error: " & Err.Description & "</li>"
End if
Set objNewMail = Nothing
end sub
sub cdonts()
on error resume next
Set objNewMail = Server.CreateObject ("CDONTS.NewMail")
objNewMail.BodyFormat = 1
objNewMail.MailFormat = 0
on error resume next '## Ignore Errors
objNewMail.Send systememail, email, topic, mailbody
If Err <> 0 Then
Err_Msg = Err_Msg & "<li>Your request was not sent due to the following error: " & Err.Description & "</li>"
End if
on error resume next '## Ignore Errors
Set objNewMail = Nothing
end sub
sub chilicdonts()
Set objNewMail = Server.CreateObject ("CDONTS.NewMail")
on error resume next '## Ignore Errors
objNewMail.Send systememail, email, topic, mailbody
If Err <> 0 Then
Err_Msg = Err_Msg & "<li>Your request was not sent due to the following error: " & Err.Description & "</li>"
End if
on error resume next '## Ignore Errors
Set objNewMail = Nothing
end sub
sub dkqmail()
Set objNewMail = Server.CreateObject("dkQmail.Qmail")
objNewMail.FromEmail = systememail
objNewMail.ToEmail = email
objNewMail.Subject = topic
objNewMail.Body = mailbody
objNewMail.CC = ""
objNewMail.MessageType = "TEXT"
on error resume next '## Ignore Errors
objNewMail.SendMail()
If Err <> 0 Then
Err_Msg = Err_Msg & "<li>Your request was not sent due to the following error: " & Err.Description & "</li>"
End if
Set objNewMail = Nothing
end sub
sub geocel()
set objNewMail = Server.CreateObject("Geocel.Mailer")
objNewMail.AddServer strMailServer, 25
objNewMail.AddRecipient email, username
objNewMail.FromName = sysname
objNewMail.FromAddress = strFrom
objNewMail.Subject = topic
objNewMail.Body = mailbody
on error resume next '##  Ignore Errors
objNewMail.Send()
if Err <> 0 then
Response.Write "Your request was not sent due to the following error: " & Err.Description
else
Response.Write "Your mail has been sent..."
end if
Set objNewMail = Nothing
end sub
sub iismail()
Set objNewMail = Server.CreateObject("iismail.iismail.1")
MailServer = strMailServer
objNewMail.Server = strMailServer
objNewMail.addRecipient(email)
objNewMail.From = systememail
objNewMail.Subject = topic
objNewMail.body = mailbody
on error resume next '## Ignore Errors
objNewMail.Send
If Err <> 0 Then
Err_Msg = Err_Msg & "<li>Your request was not sent due to the following error: " & Err.Description & "</li>"
End if
Set objNewMail = Nothing
end sub
sub jmail()
Set objNewMail = Server.CreateObject("Jmail.smtpmail")
objNewMail.ServerAddress = strMailServer
objNewMail.AddRecipient email
objNewMail.Sender = systememail
objNewMail.Subject = topic
objNewMail.body = mailbody
objNewMail.priority = 3
on error resume next '## Ignore Errors
objNewMail.execute
If Err <> 0 Then
Err_Msg = Err_Msg & "<li>Your request was not sent due to the following error: " & Err.Description & "</li>"
End if
Set objNewMail = Nothing
end sub
sub smtp()
Set objNewMail = Server.CreateObject("SmtpMail.SmtpMail.1")
objNewMail.MailServer = strMailServer
objNewMail.Recipients = email
objNewMail.Sender = systememail
objNewMail.Subject = topic
objNewMail.Message = mailbody
on error resume next '## Ignore Errors
objNewMail.SendMail2
If Err <> 0 Then
Err_Msg = Err_Msg & "<li>Your request was not sent due to the following error: " & Err.Description & "</li>"
End if
Set objNewMail = Nothing
end sub
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -