Keystone-classic: Add support for nodemailer

Created on 21 Mar 2014  路  23Comments  路  Source: keystonejs/keystone-classic

Nodemailer looks great - http://www.nodemailer.com

Would be nice to integrate it as an alternative to Mandrill for sending emails.

discussion enhancement

Most helpful comment

Is there any news about nodemailer support?
We have time until April 27, 2016 on mandrill mailing service.

All 23 comments

Used Nodemailer on a few projects, works well and has support for Mandrill built in.

+1

Much more relevant now that mandrill has dropped its free tier... I'm focused on our new API and getting the elemental rebuild out so if anyone would like to step up and work on this in the short term that would be great.

I've implemented basic Nodemailer support in this module. It does keystone message object to Nodemailer object mapping. Because of the missing documentation I'm not sure how the output mapping should look like. Feel free to use and fork this code or even integrate it into keystone.

@bergos Thank you very much!This is what I need!Would you like to send a pull request to the repository?

@wuhaixing It's designed as an optional module for keystone. I'm not sure if it should be part of the keystone package by default (even just as a dependency). It would also require a possibility in keystone to configure the mailer module. At the moment keystone-nodemailer replaces keystone.Email.prototype.send. I would propose something like that: keystone.set('email mailer', 'keystone-nodemailer');. Than keystone could dynamically require the defined module.

@JedWatson should https://github.com/bgag/keystone-nodemailer be integrated?

otherwise this issue may be solved by adding docs to http://keystonejs.com/docs/configuration/#services

I like the idea of nodemailer, and maybe including a rather detailed setup for ONE easy transport like gmail by default, direct others to nodemailer for info

Is there any news about nodemailer support?
We have time until April 27, 2016 on mandrill mailing service.

I have tried keystone-nodemailer with nodemailer-mailgun-transport
works but not inlines css, Mailgin recommends to use node-premailer by @JedWatson :)
can we integate it with keystonejs?

Definitely high up on our feature list, since Mandrill shut down, but I'm in the middle of #2566 at the moment. Do you want to take a look at starting this off?

I have started to learn programming about a year ago, because I have changed the country of living.
I really want to help, but for now it's too hard for me, sorry.

MailChimp are recommending SparkPost as a Mandrill alternative, they are committed to a free tier https://www.sparkpost.com/mandrill-migration-guide

keystone-nodemailer with nodemailer-mailgun-transport sends emails, but doesn't sends attacments.
First bug in keystone-nodemailer: the array of attachments passed to send function before Array.map finished, because of synchronous.
And the second bug with attachments is in nodemailer-mailgun-transport, in Mailgun logs attachments is an empty array.
In the sparkpost api I don't see any attachments support.

@mxstbr please, can you take a look at #2698
I was integrated it in my projects, works well.

I see it was suggested a year ago to add node mailer support. Did this get implemented?
I can add the keystone-nodemailer package, but don't see how to configure it and the comments above say it is buggy.

There are some PR for keystone-nodemailer and I have a patch for text mail support. I will merge the stuff next week.

An official interface in keystone would be nice. Replacing keystone.Email.prototype.send is a ugly hack.

Thanks. So in it's current form is there nowhere to set say SMTP details?

The nodemailer options can be configured using the keystone property email nodemailer. The value/object is used in the nodemailer.createTransport call.

Sorry I missed that. Got it working thanks :)

+1 for keystone-nodemailer and mailgun :-)

See https://github.com/keystonejs/keystone-email - this is nearly complete, would love some review and testing. I'm planning to replace keystone.Email in 0.4 with this

Closing as no longer relevant with keystone-email.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

joernroeder picture joernroeder  路  5Comments

javierpelozo picture javierpelozo  路  5Comments

kamontat picture kamontat  路  5Comments

koenoe picture koenoe  路  4Comments

josephg picture josephg  路  4Comments