diff --git a/scripts/newsletter-lib.mjs b/scripts/newsletter-lib.mjs index 9aae8fa617c..55a92b233bc 100644 --- a/scripts/newsletter-lib.mjs +++ b/scripts/newsletter-lib.mjs @@ -65,13 +65,6 @@ const send = async (test = true) => { const subscribers = await getSubscribers(test) const content = await asHtml(text) const inject = { content } - const smtp = nodemailer.createTransport({ - host: process.env.SMTP_HOST, - auth: { - user: process.env.SMTP_USER, - pass: process.env.SMTP_PASS, - }, - }) // Oh AWS your APIs are such a clusterfuck const client = new SESv2Client({ region: 'us-east-1' }) @@ -120,28 +113,11 @@ const send = async (test = true) => { }) let result try { - result = await client.send(command) + await client.send(command) } catch (err) { console.log(err) return false } - - // Via SMTP - /* - await smtp.sendMail({ - from: '"FreeSewing" ', - to: sub.email, - subject: 'FreeSewing newsletter: Summer 2022', - headers: { - Language: 'en', - 'List-Owner': 'joost@joost.at', - 'List-Subscribe': 'https://freesewing.org/community/newsletter/', - 'List-Unsubscribe': unsub, - }, - text, - html: body, - }) - */ } i++ }