cancel
Showing results for 
Search instead for 
Did you mean: 

What is the best way to add email attachments?

ms1
Champ in-the-making
Champ in-the-making
Hello All,

I have looked at proposed solutions for this and nothing is really what I want. I understand that I could write my own custom code to send an email with attachments, but I would really like to have a Mail Task in the process and use that as the basis for sending my email.

Here is what I need to do and am looking for suggestions on how to best implement this.
I need to write some custom code to decide which files to attach to the email.
These files could be on disk or a process attachment.
I need a solution which can be used in multiple places … hopefully a class or setup pattern or new component or something.

Thanks.
2 REPLIES 2

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi,

From my point of view the most reliable way is to implement your own service to send e-mails (process node inserts email content into DB -> email sending service sends the e-mails). It is safe because of transactions and rollback, asynchronous execution.
This email sending service should support attachment sending -> How you will implement the service is up to you.

Regards
Martin

ms1
Champ in-the-making
Champ in-the-making
Thanks. That is the same conclusion we came to. We will integrate with an existing email service and use a service task.

Mark