Skip to main content
Version: v6.5.0

Send mail

Command Description

Send Exchange email

Command Prototype

Exchange.SendMail(strDomain ,strUserName ,strPassword ,strServer ,strEmailAutoDiscover ,strFromName ,strFrom ,arrTo ,arrCc ,arrBcc ,strSubject ,strBody ,strImportance ,bSaveCopy ,bDraft ,bAsHtml ,arrAttachments)

Command parameter

parameterrequiredtypeDefault valuedescribe
strDomainTruestring""AD domain to connect to
strUserNameTruestring""Exchange account used for sending emails
strPasswordTruestring""Exchange account password for sending emails
strServerTruestring""Exchange server address
strEmailAutoDiscoverTruestring""Use this email address to automatically search for servers, which is effective when the server enables automatic discovery
strFromNameTruestring""Sender display name
strFromTruestring""Sender's email address
arrToTruexxxxxxxxxx /*Mobile Mail************************************Command prototype: Exchange.MoveMessageToFolder(strDomain ,strUserName ,strPassword ,strServer ,strEmailAutoDiscover ,objMailMessage ,strFolderName) Entry parameter: strDomain - Domain. Note: The AD domain to be connected to is strUserName - username. Note: The Exchange account strPassword - password used for sending emails. Note: The Exchange account password used for sending emails is strServer - server address. Note: Exchange server address strEmailAutoDiscover - discovers addresses automatically. Note: When using this email address to automatically search for servers, objMailMessage - mail object is valid when automatic discovery is enabled on the server. Note: The email object strFolderName in the mailing list is a folder. Note: Specify the destination folder for email movement, such as "Inbox", "Drafts", "Sent Items", etc. Output parameter: None Note: None********************************************************/ Exchange.MoveMessageToFolder("" ,"" ,"" ,"" ,"" ,{}, "")javascript""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
strBodyTruestring""The body of the email
strImportanceTrueenum"Normal"importance
bSaveCopyTruebooleanFalseDo you want to save to already sent
bDraftTruebooleanFalseDo you want to save it to the draft box
bAsHtmlTruebooleanFalseIs it in HTML format
arrAttachmentsTruearray[]Email attachments can be an array containing multiple attachment paths or a string of attachment paths

Return result

Run instance

/*********************************发送邮件****************************************
命令原型:
Exchange.SendMail(strDomain ,strUserName ,strPassword ,strServer ,strEmailAutoDiscover ,strFromName ,strFrom ,arrTo ,arrCc ,arrBcc ,strSubject ,strBody ,strImportance ,bSaveCopy ,bDraft ,bAsHtml ,arrAttachments)
入参:
strDomain--域.注:要连接的AD域
strUserName--用户名.注:用于发送邮件的Exchange帐户
strPassword--密码.注:用于发送邮件的Exchange帐户密码
strServer--服务器地址.注:Exchange服务器地址
strEmailAutoDiscover--自动发现地址.注:使用该邮箱地址自动搜索服务器,服务器开启自动发现时有效
strFromName--发件人名称.注:发件人显示名称
strFrom--发件人.注:发件人邮箱地址
arrTo--收件人.注:收件人邮箱地址,可以是一个包含多个邮箱地址的数组,也可以是一个单独的邮箱字符串
arrCc--抄送邮箱.注:抄送邮箱地址,可以是一个包含多个邮箱地址的数组,也可以是一个单独的邮箱字符串
arrBcc--密送邮箱.注:密送邮箱地址,可以是一个包含多个邮箱地址的数组,也可以是一个单独的邮箱字符串
strSubject--邮件主题.注:电子邮件的主题
strBody--邮件正文.注:电子邮件的正文
strImportance--重要性.注:重要性
bSaveCopy--存副本.注:是否保存到已发送
bDraft--存草稿.注:是否保存到草稿箱
bAsHtml--html格式.注:是否html格式
arrAttachments--邮件附件.注:邮件附件,可以是一个包含多个附件路径的数组,也可以是一个附件路径字符串
出参:

注意事项:

********************************************************************************/
Exchange.SendMail("" ,"" ,"" ,"" ,"" ,"" ,"" ,"" ,"" ,"" ,"" ,"" ,"Normal" ,False ,False ,False ,[])