Info |
---|
|
This routine is available since starting with Power Scripts for JIRA™ 4.0.9 (server). |
Syntax
saveAttachmentFromEmail(attachmentName, filePath)
...
Excerpt |
---|
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 |
---|
Note that if there are multiple attachments |
|
withthe with the same name, this will always attach the first one in the list. |
|
filePath | string | Yes |
The file File path where the attachment file is saved |
.Return type
boolean
true 'True' if the attachment file was successfully saved to the specified file path; , 'false' otherwise.
Example
Code Block |
---|
IncomingEmail mail = getIncomingEmail();
for(string att in mail.attachments) {
saveAttachmentFromEmail(att, "/tmp/guess" + att + ".tmp");
}
|
See
...
also
Filter by label (Content by label) |
---|
showLabels | false |
---|
max | 435 |
---|
showSpace | false |
---|
cql | label = "mail_handler_routines" |
---|
labels | jira_comment_routine |
---|
|