@promise-watch/smtp
Advanced tools
Comparing version 0.0.5 to 0.0.6
@@ -11,3 +11,8 @@ "use strict"; | ||
async send({ title, body }) { | ||
await this.transporter.sendMail(Object.assign({ subject: title, text: body, html: `<p>${body}</p>` }, this.sendInfo)); | ||
await this.transporter.sendMail({ | ||
subject: title, | ||
text: body, | ||
html: `<p>${body}</p>`, | ||
...this.sendInfo, | ||
}); | ||
} | ||
@@ -14,0 +19,0 @@ } |
{ | ||
"name": "@promise-watch/smtp", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"main": "dist/index.js", | ||
@@ -11,3 +11,3 @@ "author": "Jason Raimondi <jason@raimondi.us> (https://jasonraimondi.com)", | ||
"dependencies": { | ||
"@promise-watch/core": "^0.0.6", | ||
"@promise-watch/core": "^0.0.7", | ||
"nodemailer": "^6.7.2" | ||
@@ -24,7 +24,6 @@ }, | ||
"scripts": { | ||
"prebuild": "rm -rf ./dist", | ||
"build": "tsc", | ||
"prepublish": "pnpm build" | ||
"prepublish": "rm -rf ./dist && pnpm build" | ||
}, | ||
"readme": "# @promise-watch/smtp\n\n## Installation\n\n```bash\npnpm add @promise-watch/smtp\n```\n\n## Usage\n\n```typescript\nimport { SmtpNotifier } from \"@promise-watch/smtp\";\nimport type SMTPTransport from \"nodemailer/lib/smtp-transport\";\nimport type Mail from \"nodemailer/lib/mailer\";\n\nconst smtpOptions: SMTPTransport | SMTPTransport.Options | string = {\n host: process.env.SMTP_HOST,\n port: Number(process.env.SMTP_PORT) || 587,\n};\n\nconst mailOptions: Mail.Options = {\n to: process.env.SMTP_TO,\n from: process.env.SMTP_FROM,\n};\n\nconst options: ExecuteOptions = {\n dir: __dirname,\n errorNotifiers: [\n new SmtpNotifier(smtpOptions, mailOptions),\n ],\n};\n```" | ||
} |
Sorry, the diff of this file is not supported yet
5234
7
46
+ Added@promise-watch/core@0.0.7(transitive)
- Removed@promise-watch/core@0.0.6(transitive)
Updated@promise-watch/core@^0.0.7