meanjs / mean

MEAN.JS - Full-Stack JavaScript Using MongoDB, Express, AngularJS, and Node.js -
http://meanjs.org
MIT License
4.87k stars 1.98k forks source link

Setting up Emails #1269

Open ChrisSQL opened 8 years ago

ChrisSQL commented 8 years ago

Hi

Just wondering what email provider works with MEAN.js deployed to Heroku.

Gmail blocks the sign in and says its unsecure.

I can find no documentation or suggestion on an email service that works anywhere.

Thanks.

mleanos commented 8 years ago

I use Amazon's SES with my MEAN.js app deployed on Heroku. I can't remember if I got Nodemailer working with Heroku.

mleanos commented 8 years ago

Actually brainfart.. Obviously, I got Nodemailer working :)

ChrisSQL commented 8 years ago

What provider works with it?

simison commented 8 years ago

For development MailDev is great.

For production, a friend just collected a list: https://github.com/superlumen/knowledge/wiki/Transactional-Email

@ChrisMaher what's specific about Heroku? Gmail isn't meant for transactional emails so they (Gmail) block if they notice you doing any such activity.

ChrisSQL commented 8 years ago

Nothing specific about Heroku apart form that where my App is hosted.

Ill take a look through that list. Any suggestions or are they all straight forward?

mleanos commented 8 years ago

Great! Thanks for the list @simison

I didn't try any of the other providers out. I just went straight to using SES once my app was ready for emails.

simison commented 8 years ago

We at @Trustroots were for a year on Mandrill (5-7K emails/mo) but moved to SparkPost last month. All good and easy.

ChrisSQL commented 8 years ago

Is there a guide to setting one of these up with Meanjs?

Is it just a matter of getting an email and password from them and modifying this

mailer: { from: process.env.MAILER_FROM || 'email@gmail.com', options: { service: process.env.MAILER_SERVICE_PROVIDER || 'email', auth: { user: process.env.MAILER_EMAIL_ID || 'email@gmail.com', pass: process.env.MAILER_PASSWORD || 'pass' } } },

Or do i need to do more than that?

mleanos commented 8 years ago

@ChrisMaher Yes. Merely adding your provider authentication settings to this configuration, will do the trick.

trendzetter commented 8 years ago

I had to swap service with host to use my own smtp server in config/env/development.js

-      service: process.env.MAILER_SERVICE_PROVIDER || 'MAILER_SERVICE_PROVIDER',
+      host: process.env.MAILER_HOST || 'out.provider.tld',
simison commented 8 years ago

@trendzetter service is a key for Nodemailer's well known services.

List: https://github.com/nodemailer/nodemailer-wellknown#supported-services

https://github.com/meanjs/mean/blob/master/config/env/development.js#L71

Actually configuring Nodemailer at Meanjs would need some better documentation it seems.

trendzetter commented 8 years ago

I prefer to use my own server for this purpose.

lirantal commented 8 years ago

@codydaig @trendzetter @simison care to update the docs in this regard?

mleanos commented 8 years ago

@codydaig @lirantal Can this issue be closed?