Skip to content
This repository was archived by the owner on Apr 8, 2021. It is now read-only.

Email templates #8

Closed

Conversation

bcomeau
Copy link

@bcomeau bcomeau commented May 26, 2016

Add configuration for

  • Verification email subject
  • Verification email body
  • Password reset email subject
  • Password reset email body

These variables can be used in the templates

  • %username% the user's display name
  • %email% the user's email address
  • %appname% your application's display name
  • %link% the link the user must click to perform the requested action

Example

var server = ParseServer({
  ...
  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.yourdomain.com',
      // Your API key from mailgun.com
      apiKey: 'key-0123456789abcdefghijklmnopqrstuv',
      // Verification email subject
      verificationSubject: 'Please verify your e-mail for %appname%',
      // Verification email body
      verificationBody: 'Hi,\n\nYou are being asked to confirm the e-mail address %email% with %appname%\n\nClick here to confirm it:\n%link%',
      // Password reset email subject
      passwordResetSubject: 'Password Reset Request for %appname%',
      // Password reset email body
      passwordResetBody: 'Hi,\n\nYou requested a password reset for %appname%.\n\nClick here to reset it:\n%link%'
    }
  }
  ...
});

bcomeau added 6 commits May 25, 2016 15:40
* Email templates for email verification and password reset request
* Use the same variable as Parse.com
* Update README to explain how to use the new feature
@bcomeau bcomeau changed the title Feature/email templates Email templates May 26, 2016
@cherukumilli
Copy link

@drew-gross
This is a pretty good feature.
Can you please review this pull request and help merge it?

@lucianosimo
Copy link

Hi guys, anyone knows if there is any updates related to this PR? I consider this really useful
Thanks

@drew-gross
Copy link
Contributor

A big part of our strategy with adapters in general, and especially email adapters is that we want to keep the "official" ones very simple, then the community can create more complex ones with fancier features. With that in mind, I'd suggest forking this repo, adding your changes, then uploading to npm as a new package. Then, we can link to it from here, and from the main Parse Server repo+docs. @cherukumilli @lucianosimo you are of course able to do this as well with these very same changes thanks to the power of open source if @bcomeau doesn't want to!

@bcomeau
Copy link
Author

bcomeau commented Jul 22, 2016

@drew-gross
Copy link
Contributor

Thanks! I'll close this PR, if you want us to add a link to your package and/or GH repo, please use a new PR.

@drew-gross drew-gross closed this Jul 22, 2016
@bcomeau bcomeau deleted the feature/email-templates branch August 19, 2016 14:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants