From a387226854d3de01d10095eff7e50cbff3b7b0ea Mon Sep 17 00:00:00 2001 From: dave4506 Date: Sun, 29 Oct 2017 15:08:21 -0400 Subject: [PATCH] Added TROUBLESHOOT.md --- TROUBLESHOOTING.md | 60 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 TROUBLESHOOTING.md diff --git a/TROUBLESHOOTING.md b/TROUBLESHOOTING.md new file mode 100644 index 0000000..de8b051 --- /dev/null +++ b/TROUBLESHOOTING.md @@ -0,0 +1,60 @@ +If you have a non-library SendGrid issue, please contact our [support team](https://support.sendgrid.com). + +If you can't find a solution below, please open an [issue](https://github.com/sendgrid/sendgrid-nodejs/issues). + + +## Table of Contents + +* [Versions](#versions) +* [Using the Package Manager](#package-manager) +* [Viewing the Request Body](#stmpapi-header) + + +## Versions + +We follow the MAJOR.MINOR.PATCH versioning scheme as described by [SemVer.org](http://semver.org). Therefore, we recommend that you always pin (or vendor) the particular version you are working with to your code and never auto-update to the latest version. Especially when there is a MAJOR point release, since that is guaranteed to be a breaking change. Changes are documented in the [CHANGELOG](https://github.com/sendgrid/smtpapi-nodejs/blob/master/CHANGELOG.md) section. + + +## Using the Package Manager + +We upload this library to [npm](https://www.npmjs.com/package/sendgrid) whenever we make a release. This allows you to use [npm](https://www.npmjs.com) for easy installation. + +In most cases we recommend you download the latest version of the library, but if you need a different version, please use: + +`npm install @sendgrid/[package name]@X.X.X` + +Please check [here](https://www.npmjs.com/org/sendgrid) for a list of package names. + +If you are using a `package.json` file: + +```json +{ + ... + "dependencies": { + ... + "@sendgrid/[package name]": "X.X.X" + } +} +``` + + +## Outputting the STMPAPI Header + +You can output the header by the following: + +```javascript + var header = new smtpapi(); + ... + console.log(header.jsonString()); +``` + +or use it in your options for the transport (Nodemailer example): + +```javascript + var headers = { 'x-smtpapi': header.jsonString() }; + ... + var mailOptions = { + ... + headers: headers + } +```