I currently try to send an email through OroPlatform and I want the email to get logged.
I have a new entity and want to send an email onPersist. But I want the email to get displayed in entity like user emails do.

Can you give me a hint or an example how to do it the best way?

First I tried a service with an doctrine listener but I needed config and entity manager and so there was a dependency problem. Now I send the mail with a job which gets trigger by the event listener.

If you try to inject this service to the event listener, you will get an error with the injected services entity manager and config manager. (Something like dependency loop – do not know the exact error message).