add smtpInstance in emailManager
This commit is contained in:
@@ -1,12 +1,10 @@
|
||||
import { Account } from "../imap/ImapSync";
|
||||
import logger from "../../system/Logger";
|
||||
import nodemailer, { Transporter } from "nodemailer";
|
||||
|
||||
export class SmapInstance {
|
||||
export class SmtpInstance {
|
||||
transporter: Transporter;
|
||||
account: Account;
|
||||
|
||||
constructor(account) {
|
||||
constructor(account: {user: string, password: string}) {
|
||||
// todo store other data
|
||||
this.transporter = nodemailer.createTransport({
|
||||
host: "smtp.gmail.com",
|
||||
@@ -17,7 +15,6 @@ export class SmapInstance {
|
||||
pass: account.password,
|
||||
},
|
||||
});
|
||||
this.account = account;
|
||||
}
|
||||
|
||||
sendMail() {
|
||||
|
||||
Reference in New Issue
Block a user