Improve email branding and SMTP envelope
CI / test (push) Canceled after 0s
Release / promote-and-deploy (push) Canceled after 0s
CI / build-image (push) Canceled after 0s

This commit is contained in:
2026-09-18 12:51:40 +02:00
parent ad353190f3
commit 7edeafe7c3
10 changed files with 67 additions and 47 deletions
+3 -2
View File
@@ -1,5 +1,5 @@
import type { PayloadEmailAdapter } from "payload";
import { getMailFrom, getMailTransport } from "./transport";
import { getMailEnvelopeFrom, getMailFrom, getMailTransport } from "./transport";
/** Connects Payload's built-in auth emails to the same SMTP transport as ANOUMA's own emails. */
export const payloadEmailAdapter: PayloadEmailAdapter = () => ({
@@ -9,7 +9,8 @@ export const payloadEmailAdapter: PayloadEmailAdapter = () => ({
sendEmail: async (message) => {
return getMailTransport().sendMail({
...message,
from: message.from || getMailFrom(),
from: getMailFrom(),
envelope: { from: getMailEnvelopeFrom() },
});
},
});