Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse requestPasswordReset does not work after connecting Heroku domain to Mailgun #3378

Closed
amitbed opened this issue Jan 15, 2017 · 7 comments

Comments

@amitbed
Copy link

amitbed commented Jan 15, 2017

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: '[email protected]',
 // 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?

Thanks

@flovilmart
Copy link
Contributor

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
Copy link
Author

amitbed commented 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
Copy link
Contributor

As verifyUserEmails is set to true: when new users sign up, the email for validating the address is successfully sent?

@amitbed
Copy link
Author

amitbed commented Jan 15, 2017

Nope

@natanrolnik
Copy link
Contributor

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
Copy link
Author

amitbed commented 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
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants