forwardemail / email-templates

Create, preview (browser/iOS Simulator), and send custom email templates for Node.js. Made for @forwardemail, @ladjs, @cabinjs, @spamscanner, and @breejs.
https://forwardemail.net/docs/send-emails-with-node-js-javascript
MIT License
3.67k stars 337 forks source link

Address object #262

Closed polalegria closed 6 years ago

polalegria commented 6 years ago

Hello,

I am trying to configure the message, the problem is that the from does not let me add a name to the address.

const email = new Email({
  message: {
    from: '"Custom Name" no-reply@mail.com'
  },
  transport: transporter
});

I have read the configuration of nodemailer (https://nodemailer.com/message/addresses/) and they assure that it works.

Can you help me? Thanks.

niftylettuce commented 6 years ago

@polalegria should the format not be from: 'Custom Name <no-reply@mail.com>'?

it looks like there's a test that should satisfy your use case though, https://github.com/nodemailer/nodemailer/blob/master/test/addressparser/addressparser-test.js#L72-L73 -- perhaps its an issue with addressparser?

polalegria commented 6 years ago

@niftylettuce i tried this options:

from: 'Custom Name <no-reply@mail.com>',
from: '"Custom Name" <no-reply@mail.com>',
from: 'Custom Name no-reply@mail.com'

And any works for me... Addressparser is inside nodemailer, really?

niftylettuce commented 6 years ago

yes it used to be in its own module, unfortunately i think the maintainer found it easier and more manageable to have it all in one package and repo. if this issue is fixed please close it?

On Nov 22, 2017 1:08 PM, "Pol Alegria" notifications@github.com wrote:

@niftylettuce https://github.com/niftylettuce i tried this options:

from: 'Custom Name no-reply@mail.com', from: '"Custom Name" no-reply@mail.com', from: 'Custom Name no-reply@mail.com'

And any works for me... Addressparser is inside nodemailer, really?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/niftylettuce/email-templates/issues/262#issuecomment-346430987, or mute the thread https://github.com/notifications/unsubscribe-auth/AAf7hQ-loLY9F9GmszOe0ZFXS49rrRxZks5s5GMngaJpZM4QnO-_ .

polalegria commented 6 years ago

@niftylettuce thanks for your helping.