Designers > K2 Designer for Visual Studio > Design Tools > Toolbox > Event Wizards > E-Mail Event Wizard > E-Mail Event - Attachments | Send feedback |
The e-mail attachments field (simple mode) or screen (advanced mode) lists the location and file name of multiple or single files that must be attached to the e-mail when the mail is sent to the recipients. Multiple sources of files can be used for attachments, for example: files returned by a SmartObject method; a base64 XML node; File inline functions; an expression that builds a file path accessible to the K2 server.
In simple mode, attachments are added to the e-mail by clicking the Browse button and locating the files to attach (these files must be available at runtime) or by use of inline functions or fields dragged from the Context Browser (ellipsis button). The Browse button performs the GetFileFromLocation function, but allows the user to browse the file system with the Open dialogue for a file to attach. Each additional file attached to the e-mail will display in a green block, blocks are separated by a white space but no manually entered delimiter is needed from the user.
Any combination of the multiple sources mentioned here can be used to retrieve or specify the e-mail attachments. For example, if a SmartObject returns two files and the GetFilesFromLocation function returns one, there will be three files attached to the e-mail.
Workflow assocated attachments are available from Process Instances of workflows that have Attachments enabled. These attachements will be added by a user during the runtime of a process.
For more information see How to use the Workflow Attachement and Workflow Comment SmartObjects
Advanced mode is selected on the wizard Welcome screen and differs from the Simple mode in the following ways:
The Attachments screen is essentially an expanded version of the field from Simple mode.
Note that only a single attachment can be added per line in advanced mode.
|
Feature | What it is | How to use it |
---|---|---|
Add | Add a field for an attachment | Adds a new attachment to the e-mail event |
Edit | An attachment's configuration can be edited | Edits the existing, selected Mail attachment configuration |
Remove | An attachment can be deleted if required | Removes the selected attachment listing |
Remove All | All listed attachments can be removed from the e-mail | Removes all the attachment listings in the dialog |
For more information and a 'How To' on Files Inline Functions and email attachments, see the KB article KB001334 |
The files attached to the mail must be stored in a location accessible by the Process at run time. For this to take place effectively, the document must be located in a reliable document share or in a SharePoint Document library. Removable document stores are not advisable; removable drives, backup media, etc. Document shares are more reliable in the sense that less infrastructure is required to maintain the integrity of the document and its location. When a SharePoint library is used as the document source location, the document being stored in a shared SharePoint document library cannot be attached to the mail directly.
Note that the K2 Service account identity is used to retrieve the files, unless the event is configured to run as a different identity. See the Run As topic for more information. |