diff --git a/src/transporter.ts b/src/transporter.ts index 7c27269..388b5c7 100644 --- a/src/transporter.ts +++ b/src/transporter.ts @@ -1,10 +1,11 @@ // @deno-types="npm:@types/nodemailer" import nodemailer from 'nodemailer' -const dkimPrivateKey = await Deno.readTextFile( - '/home/julien/dkim_sendmail_keys/dkim_sendmail_cohabit_fr.pem', -).catch((cause) => { - throw new Error('unable to load DKIM private key', { cause }) +const dkimPath = '/home/julien/dkim_sendmail_keys/dkim_sendmail_cohabit_fr.pem' +const dkimPrivateKey = await Deno.readTextFile(dkimPath).catch((cause) => { + throw new Error(`unable to load DKIM private key from "${dkimPath}"`, { + cause, + }) }) export const transporter = nodemailer.createTransport({