You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is impossible to use asynchronous send from short-lived processes,
The send method calls start_link, so when it gets called from a short-living process such as for example cowboy handler the smtp sending process terminates prematurely just after parent process terminates.
I mean it is possible but one has to spawn a process just to be able to to call send
The text was updated successfully, but these errors were encountered:
This is by design. You can indeed do a spawn and call the synchronous method. That will make you responsible for managing the spawned process. Or just send the mail synchronously from your main process, then you can also handle the result.
If you are sending you will also need to handle the retries and other logic. Regretfully, sending mail isn't just "send and forget", unless you are using a relay and are absolutely sure that the relay is 100% up and reachable.
But there's the third parameter of send, a callback fun which I think exists exactly for handling return values out of the caller process, right? And the only way to react on errors without callback is to set trap_exit for the caller.
It is impossible to use asynchronous
send
from short-lived processes,The
send
method callsstart_link
, so when it gets called from a short-living process such as for example cowboy handler the smtp sending process terminates prematurely just after parent process terminates.I mean it is possible but one has to spawn a process just to be able to to call
send
The text was updated successfully, but these errors were encountered: