I have a business process which reads emails to send from a custom entity and sends them using the "Send Email" process element.
After that I need to check if the email was sent.
If an issue occurred I need to update the status in my custom entity to "Error".
I could not find a way to detect if an error occurred while sending a mail.
I already read about "Ignore errors on sending" checkbox here but it does not respond to my needs.
I also tried to use [#MySendEmailProcessElement.Activity completed#] but it is always false.
Can you suggest me another way to check if the email was sent?
Like
Hello.
Thank you for your question.
To determine whether an email was successfully sent in your business process, you can utilize the following two columns from the Activity object:
- ErrorOnSend – contains the error message if sending failed.
- SendDate – stores the timestamp when the email was successfully sent.
You can use the following logic:
- If ErrorOnSend is empty and SendDate is populated → the email was sent successfully.
- If ErrorOnSend is populated and SendDate is empty → the email failed to send.
- If both ErrorOnSend and SendDate are empty → the email is likely pending or not processed yet.
Based on this, you can use a conditional flow in your business process to update the status in your custom entity accordingly.
Best regards,
Antonii.
Antonii Viazovskyi,
Hi, which filter do I need to apply to the Activity object to select the email I've just sent?
I added the Read Activity step after the Send Email:
Is it correct to read it using the following filter?
Anyway I cannot see ErrorOnSend and SendDate fields in the Activity object. Am I looking in the correct object?