Availability
This routine is available starting with Power Scripts 4.0.9
Syntax
saveAttachmentFromEmail(attachmentName, filePath)
Description
Saves the attachment file from the incoming email to a specific file path.
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
attachmentName | string | Yes | The name of the attachment from the incoming email. Note that if there are multiple attachments withthe same name, this will always attach the first one in the list. |
filePath | string | Yes | The file path where the attachment file is saved. |
Return type
boolean
true if the attachment file was successfully saved to the specified file path; false otherwise
Example
IncomingEmail mail = getIncomingEmail(); for(string att in mail.attachments) { saveAttachmentFromEmail(att, "/tmp/guess" + att + ".tmp"); }
See also
-
getIncomingEmail (Power Scripts™ for Jira 4.0)
-
attachFileFromEmail (Power Scripts™ for Jira 4.0)
-
attachAllFilesFromEmail (Power Scripts™ for Jira 4.0)
-
saveAttachmentFromEmail (Power Scripts™ for Jira 4.0)