npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@keyp/parse-server-mailjet-adapter

v1.1.1

Published

Used to send Parse Server password reset emails through Mailjet

Downloads

8

Readme

parse-server-mailjet-adapter

Used to send Parse Server password reset emails through Mailjet

Installation

npm install parse-server-mailjet-adapter --save

Configuration

var api = new ParseServer({
  ...
  // Your apps name. This will appear in the subject and body of the emails that are sent.
  appName: "My application",
  // The options for the email adapter
  emailAdapter: {
    module: "parse-server-mailjet-adapter",
    options: {
      // The API key from your Mailjet account
      apiKey: "YOUR_MAILJET_API_KEY",
      // The API secret from your Mailjet account
      apiSecret: "YOUR_MAILJET_API_SECRET",
      // The email to send Mailjet templates bug reports to
      apiErrorEmail: "[email protected]",
      // The email address that your emails come from
      fromEmail: "[email protected]",
      // The name do display as the sender (optional)
      fromName: "The sender name",
      //
      // Parameters for the reset password emails
      //
      // The subject of the email to reset the password
      passwordResetSubject: "Reset My Password",
      // Set it to use a template with your Mailjet account.
      // This is the id of the template to use.
      passwordResetTemplateId: 12345,
      // If you do not use template, you can set the plain text part here
      passwordResetTextPart: "Hi,\n\nYou requested to reset your password for {{var:appName}}.\n\nPlease, click here to set a new password: {{var:link}}",
      // If you do not use template, you can set the html part here
      passwordResetHtmlPart: "Hi,<p>You requested to reset your password for <b>{{var:appName}}</b>.</p><p>Please, click here to set a new password: {{var:link}}</p>",
      //
      // Parameters for the email verification emails
      //
      // The subject of the email to reset the password
      verificationEmailSubject: "Verify your email",
      // Set it to use a template with your Mailjet account.
      // This is the id of the template to use.
      verificationEmailTemplateId: 67890,
      // If you do not use template, you can set the plain text part here
      verificationEmailTextPart: "Hi,\n\nYou are being asked to confirm the e-mail address {{var:email}} with {{var:appName}}\n\nClick here to confirm it: {{var:link}}",
      // If you do not use template, you can set the html part here
      verificationEmailHtmlPart: "Hi,<p>You are being asked to confirm the e-mail address {{var:email}} with <b>{{var:appName}}</b></p><p>Click here to confirm it: {{var:link}}</p>",
      
      // Optional: A callback function that returns the options used for sending
      // verification and password reset emails. The returned options are merged
      // with this options object.
      // If needed, this function can also return a promise for an options object.
      getIndividualOptions: function(targetOpts) {
        var toMail = targetOpts.to || (targetOpts.user && targetOpts.user.get("email"));
        if (toMail === "[email protected]") {
          return {
            passwordResetSubject: "Please reset your password your Highness"
          }
        }
        return {}
      }
    }
  }
  ...
});

The variables {{var:appName}}, {{var:email}} and {{var:link}} are automatically replaced with the name you provided for your application, the email of the user and the link to reset the password or to verify the email.