mirror of
https://github.com/screentinker/screentinker.git
synced 2026-05-15 07:32:23 -06:00
chore(email): log successful sends for observability
Previously sendEmail() only logged on error/suppression paths; success
was silent. After prod deploy of c71c401 it was unclear whether the
first alert tick had actually delivered email or not - the answer was
yes but had to be derived from 'no error log + recipient query showed
matching device'. Add a log line on success so future observability
doesn't require detective work.
This commit is contained in:
parent
dddc48440b
commit
f4d2a0330b
|
|
@ -138,6 +138,7 @@ async function sendEmail({ to, subject, text, html }) {
|
|||
try {
|
||||
const token = await getAccessToken();
|
||||
await postSendMail(token, buildSendMailPayload(to, subject, text, html));
|
||||
console.log(`[EMAIL] sent to ${to}: ${subject}`);
|
||||
return { sent: true };
|
||||
} catch (e) {
|
||||
console.error(`[EMAIL] Graph send failed for ${to}: ${e.message}`);
|
||||
|
|
|
|||
Loading…
Reference in a new issue