Send byte[] file as email attachment

Four Stars

Send byte[] file as email attachment

Dear community

 

I'm need to Talend and not sure what the correct way is to handle email attachments.

 

I'm sending a  binary file via a tRestRequest which I would like to send via email (attachment). As far as I can tell, the mail attachment parameter only accepts a String List. 

 

Any ideas?

 

Regards,

Jaco 

Four Stars

Re: Send byte[] file as email attachment

Here is some more Infos:

 

Screenshot_1.pngScreenshot_2.png

 

I can see that the binary file is read via tLogRow, just not sure how I can add this as an email attachment. The process should be able to attach any type of file.

 

Many thanks!

Regards,

Jaco

Moderator

Re: Send byte[] file as email attachment

Hello,

Sorry for delay!

In attachments field of tsendmail component, you need to enter the path to the attached file or the path to the folder if all files directly under it will be attached.

Do you want to attach automatically an attachment to an email sending via REST?

 

Best regards

Sabrina

 
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Four Stars

Re: Send byte[] file as email attachment

Hi Sabrina and thanks for the reply.

 

I think we will be more efficient if you would read the complete ticket.

 

My question was how can I attach a file (in BYTE[]) which was send via REST. I know how to attach a file from a file path. I can also save the received file to the file system, but the goal is to send it directly as attachment.

 

Goal is to build a message service so that I can send a mail with attachment via a REST connector.

 

Thanks!

Jaco

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog