To have an email sent out. But if the email fails, we get notified that it did not send out.
And if it fails, it stays failed.
What is the problem & what have you tried?
When the Email: Send an email module fails, and after the error handling resolves (and notifies the team that the email was not sent), the email sometimes gets sent out anyway. I would expect that the module would stop running after it has triggered error handling.
At first I thought that maybe the scenario was being triggered twice or that there was an iterator upstream that was triggering the modules more than once - anything to explain how the email module could both report it failed and then also send the email. But I’ve reviewed everything and ruled those possibilities out.
I don’t know where to start. I can’t fix the module, so I need to improve the workflow to account for this oddity. But how do I tell if the module succeeded or failed if it will sometimes succeed after saying it failed?
An option that comes to mind as I write this is adding a sleep and router module after the email module. After sleeping for 1 minute I can use filters after the router to check for some value in the email module that will only exist if the email was successfully sent.
Is there a better way to work around this?
Error messages or input/output bundles
The email module’s error message is “The operation timed out”.
Maybe you can try searching the Sent folder when the timeout happens to see if the email is there and then have a router with different error handling depending if it was actually sent or it wasn’t?
We use Exchange (on-prem), so the connection type for the email module is “Other (SMTP)”.
I did find a pattern when looking over the history: Almost every time the scenario reached this email module it triggered the error handling. Despite that, every email was sent out successfully.
I say “almost every time” because there was 1 instance where the email module completed in 51 seconds with a warning, and did not throw an error. The warning was about an inability to contact the IMAP server (the module is setup to save sent emails in the mailbox).
I looked into the IMAP connection and found it doesn’t work. The emails are not stored in the mailbox’s sent folder, and the module cannot load the dropdown of folders to save the email to. But this must have worked once upon a time, because the connection was created and a (now non-existent) mailbox folder is selected to save to.
I’m going to remove the IMAP connection / option to save the sent emails and see if the next few scenario runs fare any better.
In the first post, I said the email sometimes gets sent out and sometimes not - that was based on anecdote and not evidence