reshuffle-smtp-connector
Version:
A Reshuffle SMTP connector
30 lines (29 loc) • 851 B
TypeScript
/// <reference types="node" />
import { BaseConnector, Reshuffle } from 'reshuffle-base-connector';
import { SentMessageInfo } from 'nodemailer';
export interface SMTPConnectorOptions {
fromName: string;
fromEmail: string;
host: string;
port: number;
username: string;
password?: string;
}
interface Attachment {
filename: string;
content: Buffer;
}
interface EmailMessage {
to: string;
subject: string;
html: string;
attachments?: Attachment[];
}
declare class SMTPConnector extends BaseConnector<SMTPConnectorOptions, null> {
private transporter;
private from;
constructor(app: Reshuffle, options: SMTPConnectorOptions, id?: string);
updateOptions(options: SMTPConnectorOptions): void;
send(message: EmailMessage): Promise<SentMessageInfo | undefined>;
}
export { SMTPConnector };