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
parameter | required | type | Default value | describe |
---|---|---|---|---|
strDomain | True | string | "" | AD domain to connect to |
strUserName | True | string | "" | Exchange account used for sending emails |
strPassword | True | string | "" | Exchange account password for sending emails |
strServer | True | string | "" | Exchange server address |
strEmailAutoDiscover | True | string | "" | Use this email address to automatically search for servers, which is effective when the server enables automatic discovery |
strFromName | True | string | "" | Sender display name |
strFrom | True | string | "" | Sender's email address |
arrTo | True | xxxxxxxxxx /*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 |
arrCc | True | string | "" | CC email addresses can be an array containing multiple email addresses or a single email string |
arrBcc | True | string | "" | Confidential email address can be an array containing multiple email addresses or a single email string |
strSubject | True | string | "" | Email subject |
strBody | True | string | "" | The body of the email |
strImportance | True | enum | "Normal" | importance |
bSaveCopy | True | boolean | False | Do you want to save to already sent |
bDraft | True | boolean | False | Do you want to save it to the draft box |
bAsHtml | True | boolean | False | Is it in HTML format |
arrAttachments | True | array | [] | 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 ,[])