Currently, we use the following approach to send letters in a transaction: EMails are written to the database table in the transaction, and the auxiliary thread takes them out and sends them asynchronously. The latter can be repeated several times, which makes us really sure that emails will leave if they can. The same thing happens when calling a report server, FAX server, etc.
source
share