Email.send does not return


#1

Hi,

I’m trying to get return value from SMTP server after sending an email but Email.send returns undefined on success.
It seems to me the problem is here: https://github.com/meteor/meteor/blob/1b34b81c7539c9cf2f5914243baedd9cc168e004/packages/email/email.js#L98

This method should probably return the value, and consequently Email.send as well that same value.

nodemailer describes callback params here:
https://nodemailer.com/usage/#sending-mail

I would like to be able to access info object described in the link above.
Am I missing something, is there a way to get this info object?

Thanks!


#2

Unless I’ve missed something, I think you’re right. If you want that response, the code looks like it needs return smtpSend(transport, options); here and return transport._syncSendMail(mail); here.

You could always submit a PR.


#3

Thanks for the fast response!

Yes, those 2 lines exactly are the problem. Just checked here first to be sure, I will submit a PR.

Edit:
PR is here