sipware-mailer
Advanced tools
Comparing version 0.3.20 to 0.3.30
10
index.js
const nm = require('nodemailer') | ||
const debug = require('debug') ('sipware-mailer') | ||
const {Context, Response, Content} = require('sipware-ua') | ||
const {Context, Response} = require('sipware-ua') | ||
const opts = {host: '127.0.0.1', port: 25, tls: {rejectUnauthorized: false}} | ||
@@ -67,5 +67,5 @@ | ||
createResponse(data) { | ||
var req = new Response({...data, ua: this.ua}); | ||
var req = new Response(data); | ||
return new Context({req, ua: this.ua}); | ||
return new Context({req, ...data}) | ||
} | ||
@@ -76,3 +76,3 @@ | ||
body: '', | ||
content: new Content({text: ''}), | ||
ua: this.ua, | ||
headers: { | ||
@@ -88,4 +88,4 @@ code: 200, | ||
return this.createResponse({ | ||
ua: this.ua, | ||
body: err.response, | ||
content: new Content({text: err.response}), | ||
headers: { | ||
@@ -92,0 +92,0 @@ code: this.getCode(err.responseCode), |
@@ -20,3 +20,3 @@ { | ||
"optionalDependencies": {}, | ||
"version": "0.3.20", | ||
"version": "0.3.30", | ||
"scripts": { | ||
@@ -23,0 +23,0 @@ "test": "mocha" |
38462