Closed pimjansen closed 3 years ago
At this point im receiving SMTP timeouts which are caused probably due the fact that the process is using the same mail class from the servicemanager instead of destroying the old one and constructing a new one.
@pimjansen The service manager by default reuses the service. So that is really by intent, and also how all service managers / containers work :).
If you want to connect / disconnect for each mail. You should model this yourself within either your job or your own service (call ->connect
, cal ->mail
and ->disconnect
for example).
Good luck!
Thanks @roelvanduijnhoven! Thought that i maybe missed something just like the doctrine unit of work and such.
I will figure something out. Probably a destruct on the job itself
Im using SLM queue with some jobs to send email. To do this i inject a mail class into the job. At this point im receiving SMTP timeouts which are caused probably due the fact that the process is using the same mail class from the servicemanager instead of destroying the old one and constructing a new one.
Result is that the connection remains open and at the end throws a timeout error.
Any idea what i can do about this?