cohabit_mail/src/transporter.ts

26 lines
576 B
TypeScript
Raw Normal View History

2024-03-28 22:32:46 +01:00
// @deno-types="npm:@types/nodemailer"
import nodemailer from 'nodemailer'
// import smime from 'nodemailer-smime'
const dkimPrivateKey = await Deno.readTextFile(
'/home/julien/dkim_sendmail_keys/dkim_sendmail_cohabit_fr.pem',
)
// const smimeOptions = {
// cert: '',
// chain: [''],
// key: '',
// }
export const transporter = nodemailer.createTransport({
sendmail: true,
newline: 'unix',
path: '/usr/sbin/sendmail',
dkim: {
domainName: 'cohabit.fr',
keySelector: 'sendmailY2024M03',
privateKey: dkimPrivateKey,
},
})
// .use('stream', smime(smimeOptions))