So I'm not using the generic Accounts-ui package and am configuring a password recovery system. So far, so good...until the error below showed up:

I know it's an error with my smtp setup in /sever/smtp.js, which reads like this:
Meteor.startup(function () {
  smtp = {
    username: 'myEmail%40gmail.com',
    password: 'password',
    server:   'smtp.gmail.com',
    port: 25
  }
  process.env.MAIL_URL = 'smtp://myEmail%40gmail.com:' + encodeURIComponent('password') + "@smtp.gmail.com:25";
});
I guess you can completely ignore the smtp object above, since I had to manually change the process.env.MAIL_URL variable because I had another error before this. This entire process is set up on my local computer/localhost.
I had port 465 before this and there was an error where the username and password were not found. I changed to port 25 and the process worked until I got this error saying that the greeting was never received.
Any help with this is much appreciated.
Edit: I would also like to add that adding the email package and changing up the ports messes up the Accounts.createUser function, where Meteor is unable to create a user unless I remove the smtp setup from the server.
I am noob in Meteor, but the below did work for me .
Meteor.startup(function () {
  smtp = {
    username: 'myEmail',   // eg: [email protected]
    password: 'password,   // eg: password for your email
    server:   'smtp.gmail.com',  // gmail smtp
    port: 25
  }
  process.env.MAIL_URL = 'smtp://' + encodeURIComponent(smtp.username) + ':' + encodeURIComponent(smtp.password) + '@' + encodeURIComponent(smtp.server) + ':' + smtp.port;
});
Let me know if this worked
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With