|
VFP 愛用者社區 本討論區為 Visual Foxpro 愛用者經驗交流的地方, 請多多利用"搜尋"的功能, 先查看看有無前例可循, 如果還有不懂的再發問. 部份主題有附加檔案, 須先註冊成為社區居民才可以下載.
|
上一篇主題 :: 下一篇主題 |
發表人 |
內容 |
jerryfly
註冊時間: 2004-02-26 文章: 12 來自: kee long
第 1 樓
|
發表於: 星期一 五月 15, 2017 11:05 am 文章主題: lotus notes 發送同時發送兩個mail會發生錯誤 |
|
|
請教個位大大先進兩個位址同時傳送會寄不出去
程式碼如下請教是否有辦法解決
LOCAL lcSubject , lcReceipient, lcBodyText, llSaveIt
LOCAL loSession , loMailDB , loMailDoc
LOCAL lcServer , lcMailFile , loRichText, loAttachment
*-- Set Variaibls for mail
lcSubject = "Test Notes Email from VFP"
cReceipient ="aaa@xxx.xxx.xx;bbb@xxx.xxx.xx"
lcBodyText = "This is the main message of the Email"
llSaveIt = .F.
*--------------- Notes Automation ------------------
loSession = CreateObject("Notes.NotesSession")
lcServer = loSession.GetEnvironmentString("MailServer",.T.) && Causes Notes To Ask for Auth
lcMailFile = loSession.GetEnvironmentString("MailFile",.T.) && Causes Notes To Ask for Auth
*-- Open the mail database in notes
loMailDB = loSession.GetDatabase(lcServer,lcMailFile)
*-- If Mail Database not open, open it.
IF !loMailDB.IsOpen
loMail.OpenMail()
ENDIF
*-- Setup new Mail Document.
loMailDoc = loMailDB.CreateDocument() && Causes Notes To Ask for Auth
WITH loMailDoc
.Form = "Memo"
.SendTo = lcReceipient
.Subject = lcSubject
.Body = lcBodyText
.SaveMessageOnSend = llSaveIt
loRichText = .CreateRichTextItem("loAttachment")
loAttachment = loRichText.EmbedObject(1454,"","c:\autoexec.bat")
*-- Send the Document
.PostedDate = DATE()
.Send(0)
ENDWITH
loMailDoc = .NULL.
loMailDB = .NULL.
loSession = .NULL. |
|
回頂端 |
|
|
|
|
您 無法 在這個版面發表文章 您 無法 在這個版面回覆文章 您 無法 在這個版面編輯文章 您 無法 在這個版面刪除文章 您 無法 在這個版面進行投票 您 無法 在這個版面附加檔案 您 無法 在這個版面下載檔案
|
|