diff --git a/.buildkite/eslint_flow_jest.yml b/.buildkite/eslint_flow_jest.yml --- a/.buildkite/eslint_flow_jest.yml +++ b/.buildkite/eslint_flow_jest.yml @@ -2,6 +2,7 @@ - command: - '(pkill flow || true)' - 'yarn cleaninstall --frozen-lockfile --skip-optional' + - 'mkdir -p keyserver/facts && touch keyserver/facts/postmark.json' - 'yarn eslint --max-warnings=0 & yarn workspace lib flow & yarn workspace web flow & yarn workspace landing flow & yarn workspace native flow & yarn workspace keyserver flow' - 'yarn workspace lib test && yarn workspace keyserver test' agents: diff --git a/keyserver/src/emails/sendmail.js b/keyserver/src/emails/sendmail.js --- a/keyserver/src/emails/sendmail.js +++ b/keyserver/src/emails/sendmail.js @@ -2,6 +2,8 @@ import nodemailer from 'nodemailer'; +import postmark from '../../facts/postmark.json'; + type MailInfo = { +from: string, +to: string, @@ -14,6 +16,15 @@ ... }; -const sendmail: Transport = nodemailer.createTransport({ sendmail: true }); +const sendmail: Transport = nodemailer.createTransport({ + host: 'smtp.postmarkapp.com', + port: 587, + secure: false, + auth: { + user: postmark.apiToken, + pass: postmark.apiToken, + }, + requireTLS: true, +}); export default sendmail; diff --git a/keyserver/src/emails/subscribe-email-updates.js b/keyserver/src/emails/subscribe-email-updates.js --- a/keyserver/src/emails/subscribe-email-updates.js +++ b/keyserver/src/emails/subscribe-email-updates.js @@ -23,7 +23,7 @@ const html = renderEmail(email); await sendmail.sendMail({ - from: 'no-reply@squadcal.org', + from: 'no-reply@comm.app', to: ashoat.landing_email, subject: title, html,