@adonisjs/mail
Version:
Mail provider for adonis framework and has support for all common mailing services to send emails
55 lines (54 loc) • 1.21 kB
JavaScript
import {
MailResponse
} from "../../chunk-CRXUSCKP.js";
import {
debug_default
} from "../../chunk-ZF2M7BIF.js";
import {
__name
} from "../../chunk-XE4OXN2W.js";
// src/transports/smtp.ts
import nodemailer from "nodemailer";
var SMTPTransport = class {
static {
__name(this, "SMTPTransport");
}
constructor(config) {
this.
}
/**
* Create transporter instance
*/
if (this.
return this.
}
this.
return this.
}
/**
* Send message
*/
async send(message) {
const transporter = this.
const smtpResponse = await transporter.sendMail(message);
return new MailResponse(smtpResponse.messageId, smtpResponse.envelope, smtpResponse);
}
/**
* Close transporter connection, helpful when using connections pool
*/
async close() {
if (!this.
return;
}
debug_default("closing smtp transport");
this.
this.
}
};
export {
SMTPTransport
};
//# sourceMappingURL=smtp.js.map