Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I send emails using my own mail server in Meteor?

Tags:

email

smtp

meteor

I am trying to enable email support for my Meteor application, and since I have my own server I want to also use my own mail server. So I installed postfix in my Debian wheezy server and successfully sent and email to my GMail address, so that means the mail server works properly and sends emails.

When I deploy my Meteor app and try to send an email though, say to do a password reset, my app crashes with the following error:

Exception while invoking method 'forgotPassword' RecipientError: Can't send mail - all recipients were rejected
at Object.Future.wait (/home/loupax/phial/bundle/programs/server/node_modules/fibers/future.js:326:15)
at smtpSend (packages/email/email.js:94)
at Object.Email.send (packages/email/email.js:155)
...
...

My MAIL_URL environment variable is in the format MAIL_URL=smtp://my_domain.tld.

like image 376
Loupax Avatar asked May 30 '14 21:05

Loupax


People also ask

Can I set up my own email server?

As is evident, setting up your own email server is not that difficult. In fact, it should take you less than an hour to get it up and running, if you don't run into any unexpected issues. However, in case you're looking for more advanced features, it is advisable to hire an IT professional to set it up for you.


1 Answers

Looks like all I had to do, is change the MAIL_URL environmental variable from smtp://my_domain.tld to smtp://localhost. After that everything worked just fine

like image 191
Loupax Avatar answered Oct 20 '22 17:10

Loupax