sendTestMail: return error

This commit is contained in:
Girish Ramakrishnan
2019-04-15 16:47:43 -07:00
parent fa5415b1eb
commit 2f068c66d4
3 changed files with 8 additions and 4 deletions
+4 -2
View File
@@ -1024,9 +1024,11 @@ function sendTestMail(domain, to, callback) {
getDomain(domain, function (error, result) {
if (error) return callback(error);
mailer.sendTestMail(result.domain, to);
mailer.sendTestMail(result.domain, to, function (error) {
if (error) return callback(new MailError(MailError.EXTERNAL_ERROR, error.message));
callback();
callback();
});
});
}