vbs處理陣列 和 Jmail傳送帶附件郵件 亂碼

2021-09-30 07:44:50 字數 1551 閱讀 9691

strdebug = "0"

if strdebug = "0" then

getuserforsendpassword

end if

function getuserforsendpassword

dim arrname,objname,arrengname,objengname,arrpwd,objpwd,i,length

arrname = array("[email protected]","[email protected]","[email protected]")

arrengname = array("a","b","c")

arrpwd = array("1","2","3")

strsubject="【服務公告】2010 9 30 18 00~22 00 外線語音密碼**與重新發放作業"

length = ubound(arrname) - lbound(arrname) + 1

for i=0 to length-1

objname = arrname(i)

objengname = arrengname(i)

objpwd = arrpwd(i)

strbody="dear "+ objengname +",

你的外線語音密碼已更改為"+ objpwd +".

**作業期間為2010/9/30 18:00~22:00,期間密碼將無法使用。

2010/9/30 22:00請開始使用新外線密碼,使用方法不變.

best regards,

its8585

"sendmail strbody,strsubject,objname

next

end function

function sendmail(strbody,strsubject, strrecipient)

set jmail = wscript.createobject("jmail.message")

'jmail.contenttype = "text/html"

jmail.mailserverusername = "****"

jmail.mailserverpassword = "****"

jmail.from = "****@163.com"

jmail.fromname="****"

'jmail.addrecipientcc "[email protected]"

jmail.addattachment("e:/1.txt")

jmail.addrecipient strrecipient

jmail.subject = strsubject

jmail.htmlbody = strbody

jmail.charset = "gb2312"

jmail.encoding = "base64"

jmail.contenttransferencoding = "base64"

jmail.send "****"

jmail.close()

set jmail = nothing

end function

Jmail傳送和接收郵件

一 利用jmail傳送郵件 1 2 利用jmail傳送郵件 3 4private void sendmailbyjmail 545 46 郵件內容 47 ojmailmessage.body txtcontent.text.trim 4849 if ojmailmessage.send txtsmt...

利用Jmail傳送和接收郵件

一 利用jmail傳送郵件 1 2 利用jmail傳送郵件 3 4private void sendmailbyjmail 545 46 郵件內容 47ojmailmessage.body txtcontent.text.trim 4849 if ojmailmessage.send txt tse...

vbs 批處理傳送郵件

使用方法 以下內容複製到新建的文字檔案中,把自己的郵箱 試驗用的是 163 使用者名稱 163 不要 跟密碼採用 base64 編碼後替換掉 mail from test 163.com 換成你的郵箱 然後儲存為 mail.bat檔案.再新建乙個文字,裡面寫要發的內容,儲存為 mail.txt 開啟...