Skip to content

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

Closed

Description

@amitbed

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?

Thanks

Activity

  1. flovilmart commented on Jan 15, 2017

    @flovilmart
    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.

  2. amitbed commented on Jan 15, 2017

    @amitbed
    Author

    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.

  3. natanrolnik commented on Jan 15, 2017

    @natanrolnik
    Contributor

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

  4. amitbed commented on Jan 15, 2017

    @amitbed
    Author

    Nope

  5. natanrolnik commented on Jan 15, 2017

    @natanrolnik
    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.

  6. amitbed commented on Jan 16, 2017

    @amitbed
    Author

    Thnak you @natanrolnik.
    Could I use a heroku domain with mailgun?
    Or should I buy my own domain for this purpose?

  7. natanrolnik commented on Jan 16, 2017

    @natanrolnik
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions