MAIL_URL & gmail


#1

Struggling to set up gmail in a MAIL_URL environment variable. I’ve used the code below but my mail is not being sent via the gmail address. Everything fires fine in development. Receive an “internal server error” when trying after deployment. Does anyone know what I am doing wrong? Would really appreciate the help.

Thank you,
Tim

MUP FILE:

{
// Server authentication info
"servers": [
{
“host”: “”,
“username”: “root”,
“password”: “”
}
],

// Install MongoDB on the server. Does not destroy the local MongoDB on future setups
"setupMongo": true,

// Application name (no spaces).
“appName”: “react”,

// Location of app (local directory). This can reference ‘~’ as the users home directory.
// i.e., “app”: “~/Meteor/my-app”,
// This is the same as the line below.
“app”: “/Users/timcorcoran/Documents/mantra_template”,

// Configure environment
// ROOT_URL must be set to your correct domain (https or http)
“env”: {
“PORT”: 80,
“MAIL_URL”: “smtp://%40gmail.com:@smtp.gmail.com:587/”
},

// Meteor Up checks if the app comes online just after the deployment.
// Before mup checks that, it will wait for the number of seconds configured below.
“deployCheckWaitTime”: 120,

// show a progress bar while uploading.
// Make it false when you deploy using a CI box.
“enableUploadProgressBar”: true
}


#2

I’m not sure how gmail handless this, but normally you would have to register your domain with the mail provider before you can send mails from server to server. For Mailgun, I had to setup specific DNS entries. But I’m not sure if this can explain internal server errors, because typically the mails would just not be sent (sliently). Have you checked the server logs using mup logs? There you should an error message for your “internal server error”.


#3

Thank you. I’ve registered my domain with the mail provider.

Good call on the mupx logs. I get the following message:

[] Exception while invoking method ‘forgotPassword’ AuthError: Invalid login - 534-5.7.14 <https://accounts.google.com/signin/continue?sarp=1&scc=1&plt=AKgnsbs0
[]

Have you ever come across an error like that?

Best,
Tim


#4

No. But it looks like a message from the useraccounts package.


#5

You have an error:

it should be
"MAIL_URL": “smtp://YOURgMAILuSERNAME%40gmail.com:@smtp.gmail.com:587/”