Skip to main content

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

ParameterRequiredTypeDefaultDescription
messageTrueexpression{}The mail object in the mailing list
rbodyTruestring""The content of the email in reply
rattachmentsTruearray['''C:\Users''']Email attachment can be an array of multiple file routes or a single route
replyallTruebooleanTrueWhether 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 "----------------------------------------------------------------------------------------------------"