I am trying to send a email in meteor with process.env and smtp gmail

前端 未结 3 1654
说谎
说谎 2020-12-30 11:09

I am using the following to send emails which works on localhost but not my server.

// server
Meteor.startup(function () {
    process.env.MAIL_URL=\"smtp://         


        
3条回答
  •  孤独总比滥情好
    2020-12-30 11:33

    Just use the email package with

    meteor add email

    Then sending email will work. Mine works with port 587 in my config.

    Meteor.startup(function () {
        process.env.MAIL_URL = 'smtp://user%40gmail.com:password@smtp.gmail.com:587';
    });
    

提交回复
热议问题