I'm looking at some old code that calls cfmail and...
# lucee
b
I'm looking at some old code that calls cfmail and have worked out that we are missing a lot of errors because the call is asynchronous so if the connection fails we don't know about it and the mail server doesn't know about it. I was hoping to find a nice shiny new 'callback' feature for cfmail but while I found some talk about it back in 2016 it doesn't appear to have happened... Before I head down the path of pushing each cfmail call into it's own thread - any news on callbacks for cfmail? Or suggestions of a better way to handle this would also be appreciated.
p
I think you have to make try with the mail listener https://docs.lucee.org/guides/cookbooks/mail_listeners.html
b
Cool! Thanks @pothys-mitrahsoft that should do nicely...