This commit is contained in:
parent
e4bc47579c
commit
7b785f99cd
@ -3,8 +3,7 @@ import * as nodemailer from 'nodemailer';
|
|||||||
import { continueRetryUntilValidation } from '$lib/utils';
|
import { continueRetryUntilValidation } from '$lib/utils';
|
||||||
|
|
||||||
class MistyMountainsMailer {
|
class MistyMountainsMailer {
|
||||||
constructor(username, password, from, domain, port) {
|
constructor(username, password, domain, port) {
|
||||||
this.from = from;
|
|
||||||
this.username = username;
|
this.username = username;
|
||||||
this.password = password;
|
this.password = password;
|
||||||
this.domain = domain;
|
this.domain = domain;
|
||||||
@ -26,7 +25,6 @@ class MistyMountainsMailer {
|
|||||||
|
|
||||||
async sendMail(to, subject, message) {
|
async sendMail(to, subject, message) {
|
||||||
const mail = {
|
const mail = {
|
||||||
from: this.from,
|
|
||||||
subject,
|
subject,
|
||||||
html: message,
|
html: message,
|
||||||
to
|
to
|
||||||
@ -45,7 +43,6 @@ export async function post({ request }) {
|
|||||||
const mailer = new MistyMountainsMailer(
|
const mailer = new MistyMountainsMailer(
|
||||||
process.env.SMTP_USERNAME,
|
process.env.SMTP_USERNAME,
|
||||||
process.env.SMTP_PASSWORD,
|
process.env.SMTP_PASSWORD,
|
||||||
process.env.FROM_EMAIL,
|
|
||||||
process.env.SMTP_SERVER,
|
process.env.SMTP_SERVER,
|
||||||
Number(process.env.SMTP_PORT)
|
Number(process.env.SMTP_PORT)
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user