- Form Designers
- K2 Workflow Designer in particular the Send E-mail Event
Files and images can be attached to the Send E-mail event. This Knowledge Base article describes how to attach files and images to the E-mail.
On the E-mail screen of the Send E-mail event, files and images can be attached by dragging an item from the Context Browser.
The following items are supported:
In the scenario below we will be using a SmartObject method to attach an image to an E-mail. Follow the steps below to set up the scenario as described above.
- Create a SmartObject with a property of type Image. Make sure to select the option Allow this SmartObject to be used in Workflows on the Details screen of the SmartObject Designer.
- Auto-generate an Item View, Editable List View and Form from the SmartObject
- Create a K2 Designer Workflow from the Form.
- Complete the Workflow Settings details of the wizard. Deselect the option to create an Item Reference. Click Next.
- Add a Data Field called ClientID of type Integer. Click Next.
- Select the Rule when Create Button is Clicked of the Client Item View to start the workflow.
- Map the ID from the Client Item View to the Data Field.
- Finish the wizard.
- Drag a Send E-mail event onto the canvas.
- Complete the details as required then open the Context Browser and navigate to the SmartObject created. Drag the Image Load method into the Attachments field.
- Map the ClientID Data Field to the ID as shown below.
- Click OK.
- Save and deploy the workflow.
- Run the Form and add a new entry on the Client Item View, then click Create.
- An E-mail is sent to the recipient with the image attached.