Responding with the correct callback #33

wants to merge 4 commits into

2 participants


When the messages are queued, the callbacks called once they are sent should be the ones given as argument for each email, not the one of the last email.


(I agree it seldom happens, just in case).




I think this makes a lot of sense. Let me do a sanity check for review and we'll merge.

Thank you!



I added another small fix : if a file was missing, the first time the method was called the callback would be called with the proper error, but the next times, it would never be called.

Another way of fixing it would be to set _templateCache[message.template].error to the error raised, and to respond this for each new call to the method (ie. without having to call readFile each time), but it would mean the server has to be reloaded when the missing file is eventually added, which I didn't like personally.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment