Skip to content

Commit

Permalink
update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
dan-nyanko committed Aug 29, 2016
1 parent b6d6129 commit ed6fe77
Showing 1 changed file with 38 additions and 29 deletions.
67 changes: 38 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,38 +18,47 @@ In addition, you also need to configure the **templates** you want to use.
You must provide at least a plain-text version for each template. The html versions are optional.

```js
...otherOptions,
emailAdapter: {
module: 'parse-server-amazon-ses-email-adapter',
options: {
// The address that your emails come from
fromAddress: 'Your Name <[email protected]>'',
accessKeyId: 'Your AWS IAM Access Key ID',
secretAccessKey: 'Your AWS IAM Secret Access Key',
region: 'Your AWS Region',
// The template section
templates: {
passwordResetEmail: {
subject: 'Reset your password',
pathPlainText: resolve(__dirname, 'path/to/templates/password_reset_email.txt'),
pathHtml: resolve(__dirname, 'path/to/templates/password_reset_email.html'),
callback: (user) => { return { firstName: user.get('firstName') }}
//...otherOptions,
emailAdapter: {
module: 'parse-server-amazon-ses-email-adapter',
options: {
// The address that your emails come from
fromAddress: 'Your Name <[email protected]>',
accessKeyId: 'Your AWS IAM Access Key ID',
secretAccessKey: 'Your AWS IAM Secret Access Key',
region: 'Your AWS Region',
// The template section
templates: {
passwordResetEmail: {
subject: 'Reset your password',
pathPlainText: resolve(__dirname, 'path/to/templates/password_reset_email.txt'),
pathHtml: resolve(__dirname, 'path/to/templates/password_reset_email.html'),
callback: (user) => {
return {
firstName: user.get('firstName')
}
}
// Now you can use {{firstName}} in your templates
},
verificationEmail: {
subject: 'Confirm your account',
pathPlainText: resolve(__dirname, 'path/to/templates/verification_email.txt'),
pathHtml: resolve(__dirname, 'path/to/templates/verification_email.html'),
callback: (user) => { return { firstName: user.get('firstName') }}
},
verificationEmail: {
subject: 'Confirm your account',
pathPlainText: resolve(__dirname, 'path/to/templates/verification_email.txt'),
pathHtml: resolve(__dirname, 'path/to/templates/verification_email.html'),
callback: (user) => {
return {
firstName: user.get('firstName')
}
}
// Now you can use {{firstName}} in your templates
},
customEmailAlert: {
subject: 'Urgent notification!',
pathPlainText: resolve(__dirname, 'path/to/templates/custom_alert.txt'),
pathHtml: resolve(__dirname, 'path/to/templates/custom_alert.html'),
}
}
},
customEmailAlert: {
subject: 'Urgent notification!',
pathPlainText: resolve(__dirname, 'path/to/templates/custom_alert.txt'),
pathHtml: resolve(__dirname, 'path/to/templates/custom_alert.html'),
}
}
}
}
```


Expand Down

0 comments on commit ed6fe77

Please sign in to comment.