You are here: User interface > How to send email with attachments

  How to send email with attachments

A standard activity allows you to send all the attachments of a work item as email attachments. A standard function allows outgoing email messages to include attachments.

To send an email message with all the attachments of a work item

  1. Open the work item on the clipboard. The work item may be open or resolved.
  2. Call the standard activity @baseclass.SendEmailWithAllAttachments. In the ReferencePage parameter, identify the name of the clipboard page that contains the work item, such as pyWorkPage.
  3. Using information in the work item, this activity creates a page of class Data-EmailAttachments containing all the work item attachments. This activity then calls the standard activity SendEmailNotificationWithAttachments, which later calls the standard function described in this topic.

To send an email message with any set of attachments

You can use this for attachments unrelated to any work item, or to send only some of the work item attachments.

  1. Make each email attachment the value of a clipboard property. These can be on the same or different pages and may include binary (non-character) data.
  2. Create a new page of class Data-EmailAttachments, with a name of your choosing.
  3. Add a single property .pyAttachment to the page; this is a Page List property of class Embed-EmailAttachment.
  4. For each attachment, complete a pyAttachments() page that contains adding values for these properties:
  5. Call the standard function SendEmailWithAttachments() (in the Pega-ProCom:DEFAULT library) supplying the page name as the AttachInfo parameter.
You can view outgoing email messages and their attachments in the Attachments section of the History/Attachment window. To open the window, click the History and Attachments icon () on a user form. When you select an email, you can open its attachment (if any) by clicking the Attached link within the View Email pop-up window. This feature enables you to confirm that the email and its attachments are correctly associated. Where there are multiple attachments, selecting one displays them all.
Definitionsattachment

UpUser Interface category