Simple tutorial on howto use meteor email packets with forgotten password?

I’m on the point where I have to get the send email to work in my meteor app.

I use

accounts-base@1.4.2
accounts-password@1.5.1
accounts-ui@1.3.0
vuejs

Howto use “meteor email” from atmospherejs so people will get a mail when they push forgot password?

What do I minimum have to setup?

This is explained in the meteor documentation

Which smtp server do people use? sendgrid/mailgun e.g.

I will try this example: https://gist.github.com/LeCoupa/9879221

I use mailgun, it works great.

1 Like

I get this error:

I20180927-10:49:10.493(2)? Exception while invoking method 'forgotPassword' { Error: getaddrinfo ENOTFOUND https https:587
I20180927-10:49:10.495(2)?     at errnoException (dns.js:50:10)
I20180927-10:49:10.497(2)?     at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:92:26)
I20180927-10:49:10.498(2)?   code: 'ECONNECTION',
I20180927-10:49:10.499(2)?   errno: 'ENOTFOUND',
I20180927-10:49:10.501(2)?   syscall: 'getaddrinfo',
I20180927-10:49:10.502(2)?   hostname: 'https',
I20180927-10:49:10.503(2)?   host: 'https',
I20180927-10:49:10.504(2)?   port: 587,
I20180927-10:49:10.505(2)?   command: 'CONN' }
Meteor.startup(function () {
  smtp = {
    username: 'postmaster@xxxxx.mailgun.org',   // eg: server@gentlenode.com
    password: 'xxxx',   // eg: 3eeP1gtizk5eziohfervU
    server:   'https://api.mailgun.net/v3/xxxxx.mailgun.org',  // eg: mail.gandi.net
    port: 587
  }

  process.env.MAIL_URL = 'smtp://' + encodeURIComponent(smtp.username) + ':' + encodeURIComponent(smtp.password) + '@' + encodeURIComponent(smtp.server) + ':' + smtp.port;
});

The server value should be smtp.mailgun.org only

Thanks, it worked.

I use the free version, and can se people have to Authorized there email before there mail work :frowning: . https://help.mailgun.com/hc/en-us/articles/217531258

You have to verify your domain.