Skip to content

Commit 2f08cfd

Browse files
committed
added auto parse and updated the version for npm release
1 parent 63a14dc commit 2f08cfd

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

Readme.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,10 @@ Attachments can be used as embedded images in the HTML body. To use this feature
172172
* Update Readme - Special thanks goes out to zzzgit for [PR 58](https://github.com/guileen/node-sendmail/pull/58)
173173
* sort mx records by priority (lowest first) - Special thanks goes out to seasick for [PR 57](https://github.com/guileen/node-sendmail/pull/57)
174174

175+
### 1.6.0
176+
177+
* Updated parsing to use auto parse
178+
175179
## Questions, Comments & Concerns
176180

177181
Please reach out to [Green Pioneer](https://github.com/greenpioneer). If I dont respond the first time please feel free to reach out again to get help( Also try using @greenpioneer in issues or prs). [Guileen](https://github.com/guileen) is the original creator.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"author": "Gui Lin <guileen@gmail.com>",
33
"name": "sendmail",
44
"description": "Sendmail without setting up SMTP server",
5-
"version": "1.5.0",
5+
"version": "1.6.0",
66
"repository": {
77
"type": "git",
88
"url": "git://github.com/guileen/node-sendmail.git"
@@ -12,6 +12,7 @@
1212
"node": ">=6.0.0"
1313
},
1414
"dependencies": {
15+
"auto-parse": "^1.7.0",
1516
"dkim-signer": "^0.2.2",
1617
"mailcomposer": "^3.12.0"
1718
},

sendmail.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
const {createConnection} = require('net');
22
const {resolveMx} = require('dns');
33
const {DKIMSign} = require('dkim-signer');
4+
const autoParse = require('auto-parse');
45
const CRLF = '\r\n';
56

67
function dummy () {}
@@ -230,7 +231,8 @@ module.exports = function (options) {
230231
if (line[3] === ' ') {
231232
// 250-information dash is not complete.
232233
// 250 OK. space is complete.
233-
response(parseInt(line), msg);
234+
let lineNumber = autoParse(line, Number)
235+
response(lineNumber, msg);
234236
msg = '';
235237
}
236238
}

0 commit comments

Comments
 (0)