Skip to content
Open
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
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

# smtp-client

> Simple, promisified, protocol-based SMTP client for Node.js.
> Simple promised, protocol-based SMTP client for Node.js.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Promisify is a method that defines in utilities module of Node. js the standard library, so "promisified" is correct.


This is an open source [npm](http://npmjs.com) package from [Node.js](http://nodejs.org). The source code is available on [GitHub](https://github.com/xpepermint/smtp-client) where you can also find our [issue tracker](https://github.com/xpepermint/smtp-client/issues).
This is an open-source [npm](http://npmjs.com) package from [Node.js](http://nodejs.org). The source code is available on [GitHub](https://github.com/xpepermint/smtp-client) where you can also find our [issue tracker](https://github.com/xpepermint/smtp-client/issues).
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Open-source in this case is used as an adjective, and the correct spelling is in fact "open-source", as suggested.


## Related Projects

Expand Down Expand Up @@ -79,15 +79,15 @@ Note that all instance methods throw an error when something goes wrong or when

**SMTPClient.prototype.connect({timeout})**:Promise;

> Connects to the SMTP server and starts socket I/O activity.
> Connects to the SMTP server and starts to socket I/O activity.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A socket is one endpoint of a two-way communication link between two programs running on the network.
The "socket I/0 activity" is correct.


| Option | Type | Required | Default | Description
|--------|------|----------|---------|------------
| timeout | Integer | No | 0 | A time in milliseconds after the operation automatically rejects (`0` disables the timeout).

**SMTPClient.prototype.data(source, {sourceSize, timeout})**:Promise;

> Sends the DATA command to the server which uploads the `source` of an email and finalize the process with the `.` (automatically appended to the source).
> Sends the DATA command to the server which uploads the `source` of an email and finalizes the process with the `.` (automatically appended to the source).
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Finalize can in this instance be interpreted as command, therefore it is correct.


| Option | Type | Required | Default | Description
|--------|------|----------|---------|------------
Expand Down Expand Up @@ -169,23 +169,23 @@ Note that all instance methods throw an error when something goes wrong or when

**SMTPClient.prototype.parseEnhancedReplyCode(line)**:String;

> A helper method which parses and returns the enhanced reply code from the provided SMTP server reply.
> A helper method that parses and returns the enhanced reply code from the provided SMTP server reply.

| Option | Type | Required | Default | Description
|--------|------|----------|---------|------------
| line | String | Yes | - | SMTP server reply string.

**SMTPClient.prototype.parseReplyCode(line)**:String;

> A helper method which parses and returns the reply code from the provided SMTP server reply.
> A helper method that parses and returns the reply code from the provided SMTP server reply.

| Option | Type | Required | Default | Description
|--------|------|----------|---------|------------
| line | String | Yes | - | SMTP server reply string.

**SMTPClient.prototype.parseReplyText(line)**:String;

> A helper method which parses and returns the message part of the provided SMTP server reply.
> A helper method that parses and returns the message part of the provided SMTP server reply.

| Option | Type | Required | Default | Description
|--------|------|----------|---------|------------
Expand Down Expand Up @@ -230,8 +230,8 @@ Note that all instance methods throw an error when something goes wrong or when

| Option | Type | Required | Default | Description
|--------|------|----------|---------|------------
| data | String,Stream,Buffer | Yes | - | Data to be sent to the SMTP server. Make sure that you apply to the SMTP rules and complete lines with `\r\n`. When sending email data stream, make sure you include the `.` as the last line.
| handler | Function,Promise | No | - | A method for handling SMTP server replies.
| data | String, Stream, Buffer | Yes | - | Data to be sent to the SMTP server. Make sure that you apply to the SMTP rules and complete lines with `\r\n`. When sending email data stream, make sure you include the `.` as the last line.
| handler | Function, Promise | No | - | A method for handling SMTP server replies.
| timeout | Integer | No | 0 | A time in milliseconds after the operation automatically rejects (`0` disables the timeout).

**Event: close**: () => {}
Expand Down Expand Up @@ -268,7 +268,7 @@ Note that all instance methods throw an error when something goes wrong or when

| Argument | Type | Description
|----------|------|------------
| chunk | Buffer,String | A chunk of data.
| chunk | Buffer, String | A chunk of data.

**Event: reply**: (line) => {}

Expand Down