Email attachments – An event was unable to invoke any of the subscribers 0x80040201

Symptom

When using a variable to save email attachments the following error is produced:

An event was unable to invoke any of the subscribers 0x80040201

Cause

There are two separate causes:

  1. The attachment file size is zero bytes, this normally indicates a blank file.
  2. The data file variable has not been setup as an Array type.

Resolution

Make sure that the file attachments from the email are greater than zero bytes.

To store attachments in a variable you a require a ‘data file’ variable which needs to be setup as an Array type. Using array allows a variable to store any number of file attachments from an inbound SMTP email.

The following shows how the variable should be configured:

Attachment Variable