Skip to main content
Version: v6.5.0

Download-Attachment

Command Description​

Download the attachment in the specified email using IBM Notes, return and output the save path to

Command Prototype​

arrayRet = IMAP.DownloadMailAttachments(objIMAP,objMail,sPath,sDecoding)

Parameter Description​

ParameterRequiredTypeDefaultDescription
objIMAPTrueexpressionobjIMAPThe controllable connection object returned by the "connect mailbox" command
objMailTrueexpressionobjMailMail message object
sPathTruepath'''C:\Users'''For the path saved in the mail attachment, you can fill in the absolute path or use @ res "path" to represent the path under the res folder of the current process. The path separator needs to be escaped, such as "C:\Laiye RPA" or @res"Laiye RPA\Laiye RPA"
sDecodingTruestring""When the attachment name of the email object contains non-English characters, it is necessary to set the correct character set to decode it, like "gb2312". Otherwise, leave the default value as an empty string

return​

arrayRet,The variable used to save the output of the command.

Demo​

mailList = IMAP.GetMailList(objIMAP,"Inbox",1,false,false,"") 
arrayRet = IMAP.DownloadMailAttachments(objIMAP,mailList[0],'''C:\Users\86188\Downloads''',"")
/*
[
"C:\\Users\\86188\\Downloads\\test.xlsx"
]
*/