Skip to main content
Version: v6.5.0

Send mail

Command Description

Sending emails through Office365 Outlook

Command Prototype

Office365.SendMail(o365Ctx ,strAccount , arrTo, arrCc, arrBcc, strSubject, strBody, strImportance, bDraft, bAsHtml, arrAttachments, strBehalf)

Command parameter

parameterrequiredtypeDefault valuedescribe
o365CtxTrueexpressiono365CtxObjects returned by connecting to the Office365 server
strAccountTruestring""Account to be operated
arrToTruestring""The recipient's email address can be an array containing multiple email addresses or a single email string
arrCcTruestring""CC email addresses can be an array containing multiple email addresses or a single email string
arrBccTruestring""Confidential email address can be an array containing multiple email addresses or a single email string
strSubjectTruestring""Email subject
strBodyTruerichText""Email body content, supports HTML type body content
strImportanceTrueenum"Normal"importance
bDraftTruebooleanFalseDo you want to save a draft
bAsHtmlTruebooleanTrueIs it in HTML format
arrAttachmentsTruearray[]Email attachments can be an array containing multiple attachment paths or a string of attachment paths
strBehalfTruestring""Proxy account requires relevant configuration, default is empty

Return result

Run instance

/*********************************发送邮件****************************************
命令原型:
Office365.SendMail(o365Ctx ,strAccount , arrTo, arrCc, arrBcc, strSubject, strBody, strImportance, bDraft, bAsHtml, arrAttachments, strBehalf)
入参:
o365Ctx--Office365对象.注:连接Office365服务器返回的对象
strAccount--帐户.注:待操作的帐户
arrTo--收件人.注:收件人邮箱地址,可以是一个包含多个邮箱地址的数组,也可以是一个单独的邮箱字符串
arrCc--抄送邮箱.注:抄送邮箱地址,可以是一个包含多个邮箱地址的数组,也可以是一个单独的邮箱字符串
arrBcc--密送邮箱.注:密送邮箱地址,可以是一个包含多个邮箱地址的数组,也可以是一个单独的邮箱字符串
strSubject--邮件主题.注:电子邮件的主题
strBody--邮件正文.注:邮件正文内容,支持HTML类型的正文内容
strImportance--重要性.注:重要性
bDraft--存草稿.注:是否存草稿
bAsHtml--html格式.注:是否html格式
arrAttachments--邮件附件.注:邮件附件,可以是一个包含多个附件路径的数组,也可以是一个附件路径字符串
strBehalf--代发帐户.注:代发帐户,需要做相关的配置,默认为空
出参:

注意事项:

********************************************************************************/
Office365.SendMail(o365Ctx ,"" , "", "", "", "", "", "Normal", False, True, [], "")