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
Parameter | Required | Type | Default | Description |
---|---|---|---|---|
objIMAP | True | expression | objIMAP | The controllable connection object returned by the "connect mailbox" command |
objMail | True | expression | objMail | Mail message object |
sPath | True | path | '''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" |
sDecoding | True | string | "" | 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"
]
*/