Reply-Mail
Command Description
Reply the email. Return true if succeeded, return false if failed
Command Prototype
bRet = Outlook.ReplyToMailMessage(message ,rbody ,rattachments ,replyall)
Parameter Description
Parameter | Required | Type | Default | Description |
---|---|---|---|---|
message | True | expression | {} | The mail object in the mailing list |
rbody | True | string | "" | The content of the email in reply |
rattachments | True | array | ['''C:\Users'''] | Email attachment can be an array of multiple file routes or a single route |
replyall | True | boolean | True | Whether to include CC in the reply |
return
bRet,The variable used to save the output of the command.
Demo
/***********************************Reply Mail************ ************************************
**Entry 1
** message--message objects in the mailing list.
**Entry 2
** rbody--the content of the email reply.
**Entry 3
** rattachments--mail attachments, which can be an array containing multiple attachment paths, or an attachment path string.
**Entry 4
** replyall--whether the reply contains CC objects.
**Exit
** bRet--The variable to which the output of the function call is saved.
*****************************************************************************************/
TracePrint "--------------------------------------------Get mailing list- ---------------------------------------------"
arrayRet = Outlook.GetMailMessages("lzz1712@outlook.com","Inbox","Test",False,True,0)
TracePrint "--------------------------------------------Reply Email-- ---------------------------------------------------------"
bRet = Outlook.ReplyToMailMessage(arrayRet[0],"Hello" ,@res"save as .txt" ,True)
TracePrint "The content of the reply arrayRet[0] is 'Hello' whether it is successful: "&CStr(bRet)
TracePrint "----------------------------------------------------------------------------------------------------"