常用Email元件傳送函式

2021-03-31 16:46:37 字數 1476 閱讀 6361

<%

sub jmail(email)

dim jmail,sendmail

set jmail=server.createobject("jmail.**tpmail")

jmail.logging=true

jmail.charset="gb2312"

jmail.contenttype = "text/html"

jmail.serveraddress=**tpserver

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=**tpserver

result=mailer.sendmail(mailserver, recipient, sender, subject, message)

if err then

sendmail=err.description

err.clear

else

sendmail="ok"

end if

end sub

%>

常用Email元件傳送函式

sub jmail email dim jmail,sendmail set jmail server.createobject jmail.tpmail jmail.logging true jmail.charset gb2312 jmail.contenttype text html jmai...

常用Email元件傳送函式

sub jmail email dim jmail,sendmail set jmail server.createobject jmail.tpmail jmail.logging true jmail.charset gb2312 jmail.contenttype text html jmai...

c 發E mail 方法總結

通過.net framework 2.0下提供的 system.net.mail 可以輕鬆的實現,本文列舉了3種途徑來傳送 1.通過localhost 2.通過普通smtp 3.通過ssl的smtp 下面一個一個來說 1.通過localhost 1public void sendmaillocalh...

Git 提交後自動發email

當然是通過hooks來實現了,對應post receive,指令碼也是已經隨git core安裝就有了的 usr share doc git core contrib hooks post receive email,不過這個指令碼用到了sendmail,我想好多機器上都沒配這個東東吧,好在有好心人...

使用Python發email電子郵件

效果圖 msg mimetext html,subtype html charset utf 8 格式化郵件內容為html,編碼為utf 8 msg subject sub 郵件主題 msg from me 發件人 msg to join to list 收件人,將列表轉換為字串 msg cc jo...