Skip to content

docs: Added TROUBLESHOOTING.md #64

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 30, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 55 additions & 6 deletions TROUBLESHOOTING.md
Original file line number Diff line number Diff line change
@@ -1,11 +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
* [Viewing Mail Header](#mail-header)

<a name="mail-header"></a>
## Viewing Mail Header
* [Versions](#versions)
* [Using the Package Manager](#package-manager)
* [Viewing the Request Body](#stmpapi-header)

<a name="versions"></a>
## 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.

<a name="package-manager"></a>
## 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"
}
}
```

<a name="stmpapi-header"></a>
## Outputting the STMPAPI Header

You can output the header by the following:

```javascript
var header = new smtpapi();
...
console.log(header.jsonString());
```

When debugging or testing, it may be useful to examine pending header to be sent.
or use it in your options for the transport (Nodemailer example):

```js
console.log(header.get())
```javascript
var headers = { 'x-smtpapi': header.jsonString() };
...
var mailOptions = {
...
headers: headers
}
```