masohi-mail 1.1.3 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
- import smtp from '../lib/conn/smtp.js'
2
- import hostinger from '../lib/conn/hostinger.js'
1
+ import smtp from './lib/conn/smtp.js'
2
+ import hostinger from './lib/conn/hostinger.js'
3
3
  import nodemailer from 'nodemailer'
4
4
 
5
5
  async function factory (pkgName) {
@@ -67,6 +67,8 @@ async function factory (pkgName) {
67
67
  const { find } = this.lib._
68
68
  let { to, cc, bcc, from, subject, message, conn, options = {} } = payload
69
69
  const c = find(this.connections, { name: conn })
70
+ if (!c) return
71
+ // TODO: wrong layout...
70
72
  if (!c) throw this.error('notFound%s%s', this.print.write('connection'), `${conn}@masohiMail`)
71
73
  from = c.options.auth.user // can't change from if using smtp
72
74
  const { text, html } = await this.formatMessage(message, options)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "masohi-mail",
3
- "version": "1.1.3",
3
+ "version": "1.2.0",
4
4
  "description": "Mail Handler for Masohi Messaging",
5
5
  "main": "index.js",
6
6
  "scripts": {