Skip to main content

I have a workspace that creates .png (image) files based on business needs. I'd like to send one email with the png files attached. The problem is, the name and number of the png files will vary with each run.

 

Currently, I have one aggregate feature with the paths of each png file stored in a list. This one feature is being fed into the emailer to trigger the send of one email.

 

How can I configure the feature coming into the emailer transformer, and the emailer attachments section, to send the png files regardless of how many there are?

 

Thanks!

Hello @carmijo​, thanks for posting to the FME Community! Have you considered consolidating your PNG's into a singular zip folder before emailing? This would allow you to have 1 attachment per email, containing x amount of PNG's. I tested this and it seems to work well.

 

After you've created your PNG's consider writing them all to a zip folder using a FeatureWriter:

 

image 

From there, you can input the _dataset attribute produced by the FeatureWriter into your Emailer (in the Attachments section):

 

image.png 

To grab the name of the zip file, I used a StringSearcher with a REGEX Expression and stored it in _zip_data_name attribute. The overall solution looked like this:

 

image 

The REGEX expression worked in my example, but please double check it produces the correct results for you! Let me know if you have any related questions! Happy to help, Kailin Opaleychuk.


Hello @carmijo​, thanks for posting to the FME Community! Have you considered consolidating your PNG's into a singular zip folder before emailing? This would allow you to have 1 attachment per email, containing x amount of PNG's. I tested this and it seems to work well.

 

After you've created your PNG's consider writing them all to a zip folder using a FeatureWriter:

 

image 

From there, you can input the _dataset attribute produced by the FeatureWriter into your Emailer (in the Attachments section):

 

image.png 

To grab the name of the zip file, I used a StringSearcher with a REGEX Expression and stored it in _zip_data_name attribute. The overall solution looked like this:

 

image 

The REGEX expression worked in my example, but please double check it produces the correct results for you! Let me know if you have any related questions! Happy to help, Kailin Opaleychuk.

Hi @kailinatsafe​, thanks for your reply. I was hoping to not have to rely on a zip file so I could view the changes within outlook, but this will certainly work if it's my best option.


Reply