You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Parse requestPasswordReset does not work after connecting Heroku domain to Mailgun #3378
Hi,
Few days ago I saw that:
ParseUser.requestPasswordResetInBackground()
I not working (since I migrated my app)
After reading the migration instructions I opened an account on Mailgun and added to parse server these lines:
verifyUserEmails: true,
emailVerifyTokenValidityDuration: 2 * 60 * 60, // in seconds (2 hours = 7200 seconds)
preventLoginWithUnverifiedEmail: false, // defaults to false
// The public URL of your app.
// This will appear in the link that is used to verify email addresses and reset passwords.
// Set the mount path as it is in serverURL
publicServerURL: 'http://MYAPP.herokuapp.com/parse',
// Your apps name. This will appear in the subject and body of the emails that are sent.
appName: 'MYAPP',
emailAdapter: {
module: 'parse-server-simple-mailgun-adapter',
options: {
// The address that your emails come from
fromAddress: 'contact@MYAPP.com',
// Your domain from mailgun.com
domain: 'mg.MYAPP.herokuapp.com',
// Your API key from mailgun.com
apiKey: 'key-xxx',
}
}
but resetting the passwords doesn't work.
I haven't verified my domain mg.MYAPP.herokuapp.com because I still don't know how to do it.
Is this a problem with my parse-server settings or with my Mailgun account?
I can't see it on mail gun. Only with a specific mail. The one registered on my mailgun account (the mail or my mailgun user, not mails on my authorization list.
I believe you should first validate your domain, so mailgun can send on your behalf.
Try first using the testing domain they provide you, then validate the domain and add it to the configuration.
In order to validate a domain, you need to control its DNS or email settings. As you don't own your app.herokuapp.com, and also don't control the DNS, I'm almost sure you won't be able to do this. If you want for testing purposes, MailGun gives you a development domain to send emails from.
In any case, I recommend buying a domain anyway, not only for sending emails. Your apps will then point to your own address, that you can route to wherever you like/need. For example, if you move from heroku to aws, or to digital ocean, the address where your apps point to will be the same, and you'll just need to update the DNS settings.
Activity
flovilmart commentedon Jan 15, 2017
Do you see the calls in the mailgun interface? IIRC, you should be able to see all API calls made to mailgun on mailgun.
amitbed commentedon Jan 15, 2017
I can't see it on mail gun. Only with a specific mail. The one registered on my mailgun account (the mail or my mailgun user, not mails on my authorization list.
natanrolnik commentedon Jan 15, 2017
As
verifyUserEmailsis set to true: when new users sign up, the email for validating the address is successfully sent?amitbed commentedon Jan 15, 2017
Nope
natanrolnik commentedon Jan 15, 2017
I believe you should first validate your domain, so mailgun can send on your behalf.
Try first using the testing domain they provide you, then validate the domain and add it to the configuration.
amitbed commentedon Jan 16, 2017
Thnak you @natanrolnik.
Could I use a heroku domain with mailgun?
Or should I buy my own domain for this purpose?
natanrolnik commentedon Jan 16, 2017
In order to validate a domain, you need to control its DNS or email settings. As you don't own
your app.herokuapp.com, and also don't control the DNS, I'm almost sure you won't be able to do this. If you want for testing purposes, MailGun gives you a development domain to send emails from.In any case, I recommend buying a domain anyway, not only for sending emails. Your apps will then point to your own address, that you can route to wherever you like/need. For example, if you move from heroku to aws, or to digital ocean, the address where your apps point to will be the same, and you'll just need to update the DNS settings.