When sending an Email fails. e.g. due to issues with the credentials, a callback(err) is invoced instead of a correct callback(err, 500). Additionally it seems like err.message is not set by the transport library, instead an additional info object is provided.
When sending an Email fails. e.g. due to issues with the credentials, a
callback(err)
is invoced instead of a correctcallback(err, 500)
. Additionally it seems like err.message is not set by the transport library, instead an additionalinfo
object is provided.https://github.com/sitcomlab/Ethics-app/blob/de7f31ec74339874ed51305b9da7dcd61b0ee07f/controllers/documents/post.js#L238
This issue can happen because depending on the SMTP configuration, the verify function https://github.com/sitcomlab/Ethics-app/blob/de7f31ec74339874ed51305b9da7dcd61b0ee07f/server.js#L61 might succeed even though sending emails will be rejected later on.