Send Email with Attachments Issue

0
Hi,   Does anyone know how to email attached and system generated documents? I’m using the email module and I’m trying to attach files that are uploaded by the user and a system generated file.    When I add a breakpoint I have visibility to the document attached by the user (via the variables ) but not the system generated file.    Microflow   After the microflow runs I receive the email, but no attachments.  Both attachment entities from my main domain model have associations to the Email.Connector. Attachments entity.   Additional Information:   After I added the Create Attachments microflow from the Email Connector Module the feature still would not work.  Microflow: Sub Microflow “ACT_SendEmailWithTemplate_Unchanged” Sub Microflow “Sub_Create Attachments (custom) Sub_CreateAttachments (this was included in the Email Connector Module)
asked
3 answers
2

If you look in microflow EmailTemplates.Sub_CreateAndSendEmail, you’ll see this microflow call

 

The submicroflow Sub_CreateAttachments takes a list of System.FileDocuments and creates a list of Attachments that are attached to the email.  Hope that helps.

 

**EDIT**

 

If you look in the Email Templates module, the SendEmail Java Action takes a list of Attachment objects as an argument.  See the screenshot below:

 

While I haven’t opened the Java action to confirm this, I suspect that this is not working for you because you are passing in a list of FileDocument objects and not a list of Attachment objects.   Perhaps there is a permissions issue or it may be that the Java action requires a list of Attachment objects.  Can you try passing in a list of Attachment objects and see if that resolves your issue?

answered
0

Here’s additional information. After I added the Create Attachments microflow from the Email Connector Module the feature still would not work.

  1.  Microflow

  1. Sub Microflow “ACT_SendEmailWithTemplate_Unchanged”

 

 

  1. Sub Microflow “Sub_Create Attachments (custom)

  1. Sub_CreateAttachments (this was included in the Email Connector Module)

 

answered
0

Hi Nakeisha Silva,

 

Sub_CreateAttachments microflow has attachment entity but if you are using file document entity please rechange the code as per the below instructions

 

  1. You have created a New email entity and retrieved the Email Template entity also right, now create a new association between email and file document & email template and file document.
  2.  Now associate the email object and email template object with the file document entity.
  3.  In the send email microflow change the parament to file document entity and remove attachments. As seen below

  1. Now run the application send mail you will receive the mail with the document whihc you have prepared for that mail content.

 

 

answered