How do I send Email from Modulus.io?


#1

Is there a way I can send email from Modulus.io by setting MAIL_URL to an smtp:// URI?

Do I need to hook it up to a service like MailGun or SendGrid?

thanks
Russell


#2

Make sure that you have the email package added and then make sure that you have your SMTP uri set somewhere on the server side.

Meteor.startup(function () {
  // AWS emailing
  process.env.MAIL_URL = 'smtp://<username>:<password>@email-smtp.us-west-2.amazonaws.com:<port>';
});

Then make your calls.

Email.send({
      to: to,
      from: from,
      subject: subject,
      text: text
    });

You will have to have an email service like SendGrid, Mailgun, Postmark, or AWS.


#3

Thanks.

I’m not sending emails myself, but relying on Accounts and the Pretty Email package.

I found this: http://rywalker.com/deploying-a-meteor-app-to-modulus/

I’ll give that a try.