[SalesForce] When are workflow email alerts sent in a transaction’s order of execution

Looking for some clarification on this. In the documentation, it's stated that steps 10 and 11 are:

10. Executes workflow rules.
11. If there are workflow field updates, updates the record again.

which suggests that "Executes workflow rules" means workflow actions, including email alerts, are taken at step 10, since step 11 is contingent on the evaluation of step 10.

However, the step after database commit is:

20. Executes post-commit logic, such as sending email.

Is an email alert that is an action of a workflow sent before or after database commit?

Best Answer

Email alerts are sent AFTER a database commit. Until the commit takes place, it makes no sense to send the email to someone telling them it's occurred. That's why step 11 is to perform the field updates, which can cause additional actions to follow.