SMTP: extend env parsing (domain/auth/starttls); add unit test with mocked TLS for sendSmtpMail; extend SmtpConfig; docs to set .env locally
This commit is contained in:
parent
53c76a0289
commit
81fd572e48
3 changed files with 98 additions and 1 deletions
|
|
@ -6,6 +6,7 @@ type SmtpConfig = {
|
|||
username: string
|
||||
password: string
|
||||
from: string
|
||||
tls?: boolean
|
||||
}
|
||||
|
||||
function b64(input: string) {
|
||||
|
|
@ -66,4 +67,3 @@ export async function sendSmtpMail(cfg: SmtpConfig, to: string, subject: string,
|
|||
socket.on("error", reject)
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue