Meteor Email.send with Mandrill

Viewed 86

Hey guys I am trying to send email with Meteor and Mandrill this is how I set it up.

process.env.MAIL_URL = 'smtp://myDomain:myAPIkey@smtp.mandrillapp.com:587'
Accounts.emailTemplates.from = 'myApp <info@myDomain.co>'

Then I try it sending like this.

Email.send({
      to: email,
      from: 'info@myDomain.co',
      subject: 'Project Invitation',
      text: 'Hi, you have been invited to a new project. You can check it at https://myApp.co'
    })

Everything seems to be fine I get no errors. However in the mandrill app I cannot see my email, and I don't get it to my inbox.

Do you have any idea why this happens?

P.S default transactional emails such as verify email, password reset etc. work perfectly.

1 Answers

Try changing from smtp to smtps and also change port to 465 like so:

process.env.MAIL_URL = 'smtps://myDomain:myAPIkey@smtp.mandrillapp.com:465'

Keep in mind that port 465 is a legacy port so use caution.

Also, check out this great article on the Meteor email package

Related