Solved

Emailer transformer wont send email with attachment

  • 24 February 2018
  • 8 replies
  • 14 views

Badge

Hi all,

I'm trying to send an email with an attachment. How my workflow works is it creates an excel spreadsheet for my QA-QC of the data. It then sends an email with the created excel spreadsheet.

Is there any reason why the email wont send with attachments? The size is less than 25 mb.

Thank you,

David

icon

Best answer by takashi 25 February 2018, 01:53

View original

8 replies

Userlevel 2
Badge +17

To clarify the situation, could you check these points?

  1. From which port of the Emailer has the input feature been output - Sent or <Rejected>?
  2. If the feature was output from the <Rejected> port, what message was logged?
  3. Did the Email server return a failure message to the sender's address?
  4. Can an email without attachments (or with a small size attachment) be sent with the same setting except Attachments?

Badge

Hi Takashi,

1) When an attachment is placed in the source file under the attachment section, it goes into the rejected port. However, without the attachment the email goes through.

2) The workflow runs successfully, but the email goes to the rejected port

3 and 4) The sender's address is fine because without an attachment I receive an email.

Also, I CAN attach a file and receive an email as long as the Excel file does not get updated. In the workflow I create an excel spreadsheet and updates every time it runs. Then the email attaches (should attach) to be replaced and attached to the email.

Attached is the workbench.

Thanks,

David

qa-qc.fmw

Badge

To clarify the situation, could you check these points?

  1. From which port of the Emailer has the input feature been output - Sent or <Rejected>?
  2. If the feature was output from the <Rejected> port, what message was logged?
  3. Did the Email server return a failure message to the sender's address?
  4. Can an email without attachments (or with a small size attachment) be sent with the same setting except Attachments?

Hi Takashi,

 

 

See response above.
Userlevel 2
Badge +17

In your workspace, the feature from the FeatureMerger (UnusedSupplier port) coud arrive in the Emailer before the Excel file (summary report) creation has completed. To guarantee that the summary report is created before the Emailer running, consider using the FeatureWriter to write it. If I'm correct, this workflow would be a workaround.

Possibly the additional FeatureMerge (unconditional merging) in the screenshot above may not be necessary in FME 2018, since the new FeatureWriter in 2018 would have an output port which outputs the input features.

Hope this helps.

Userlevel 4

I'll just add that 25MB is still considered very large for an email attachment, are you sure it's not the mail server that's rejecting your mail because of your attachment?

I've had very mixed experiences with attachment weighing more than 10MB, most often it won't work.

Badge

In your workspace, the feature from the FeatureMerger (UnusedSupplier port) coud arrive in the Emailer before the Excel file (summary report) creation has completed. To guarantee that the summary report is created before the Emailer running, consider using the FeatureWriter to write it. If I'm correct, this workflow would be a workaround.

Possibly the additional FeatureMerge (unconditional merging) in the screenshot above may not be necessary in FME 2018, since the new FeatureWriter in 2018 would have an output port which outputs the input features.

Hope this helps.

Thanks @takashi! Adding the FeatureWriter worked perfectly!

 

Badge

I'll just add that 25MB is still considered very large for an email attachment, are you sure it's not the mail server that's rejecting your mail because of your attachment?

I've had very mixed experiences with attachment weighing more than 10MB, most often it won't work.

Hi @david_r! For the time being it seems as if the email was being developed before the Excel file was created. Adding the FeatureWriter transformer solved the problem.

 

Userlevel 4
Hi @david_r! For the time being it seems as if the email was being developed before the Excel file was created. Adding the FeatureWriter transformer solved the problem.

 

Thanks for the feedback, am glad to hear. If the Excel file was written by the same workspace containing the Emailer transformer, that would explain the problem. Regular writers will continue writing even after the actual workspace (and the Emailer) has terminated, where as the FeatureWriter allows you more fine grained control of what happens when.

Reply