Frequent Email component send functions

xiaoxiao2021-03-06  22

<%

SUB JMAIL (Email)

DIM JMAIL, Sendmail

Set jmail = server.createObject ("jmail.smtpmail")

Jmail.logging = true

Jmail.charset = "GB2312"

Jmail.contentType = "text / html"

Jmail.Serveraddress = SMTPSERVER

Jmail.Sender = systememail

Jmail.subject = Topic

Jmail.Body = mailbody

Jmail.addrecipient email

Jmail.priority = 3

Jmail.execute

Set jmail = Nothing

IF Err THEN

Sendmail = err.description

Err.clear

Else

Sendmail = "ok"

END IF

End Sub

Sub CDONTS (Email)

DIM Objcdomail

Set objcdomail = server.createObject ("cdonts.newmail")

Objcdomail.from = systememail

Objcdomail.to = email

Objcdomail.subject = Topic

Objcdomail.body = mailbody

Objcdomail.send

Set objcdomail = Nothing

IF Err THEN

Sendmail = err.description

Err.clear

Else

Sendmail = "ok"

END IF

End Sub

Sub aspemail (email)

Set mailer = server.createObject ("aspmail.aspmailctrl.1))

Recipient = email

Sender = systememail

Subject = Topic

Message = mailbody

MailServer = SMTPSERVER

Result = mailer.sendmail (MailServer, Recipient, Sender, Subject, Message)

IF Err THEN

Sendmail = err.description

Err.clear

Else

Sendmail = "ok"

END IF

End Sub

%>

转载请注明原文地址:https://www.9cbs.com/read-43852.html

New Post(0)