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?
PS default transactional emails such as verify email, password reset etc. work perfectly.
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
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.