Kontaktmails: Absender und Empfängertexte anpassen
parent
531583b690
commit
b6ba795cf4
|
|
@ -9,7 +9,7 @@ export function createContactEmailService(makeTransport) {
|
||||||
{
|
{
|
||||||
SMTP_HOST: "127.0.0.1",
|
SMTP_HOST: "127.0.0.1",
|
||||||
SMTP_PORT: "1025",
|
SMTP_PORT: "1025",
|
||||||
SMTP_FROM: "Tri-Hub Simulation <kontakt@tri-hub.de>",
|
SMTP_FROM: "Tri-Hub Ernährung <noreply@tri-hub.de>",
|
||||||
},
|
},
|
||||||
makeTransport,
|
makeTransport,
|
||||||
);
|
);
|
||||||
|
|
@ -18,19 +18,20 @@ export function createContactEmailService(makeTransport) {
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
to: email,
|
to: email,
|
||||||
text: `Deine Kontaktanfrage an ${advisorDisplayName(advisor)} ist in der Simulation eingegangen.`,
|
text: `Deine Kontaktanfrage an ${advisorDisplayName(advisor)} ist in der Simulation eingegangen. ${advisorDisplayName(advisor)} wird sich bei dir melden.`,
|
||||||
|
closing: "Viele Grüße\nTri-Hub Ernährung",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
to: advisor.email,
|
to: advisor.email,
|
||||||
text: `Hallo ${advisorDisplayName(advisor)}, eine simulierte Kontaktanfrage von ${email} ist eingegangen.`,
|
text: `Hallo ${advisorDisplayName(advisor)}, bitte setze dich mit ${email} in Kontakt.`,
|
||||||
},
|
},
|
||||||
].map(async ({ to, text }) => {
|
].map(async ({ to, text, closing }) => {
|
||||||
const result = await transport.sendMail({
|
const result = await transport.sendMail({
|
||||||
from,
|
from,
|
||||||
to,
|
to,
|
||||||
subject:
|
subject:
|
||||||
"Eingangsbestätigung – Tri-Hub Kontakt (Simulation)",
|
"Eingangsbestätigung – Tri-Hub Kontakt (Simulation)",
|
||||||
text: `${text}\n\nKontaktgrund: ${reason}\n\n${contactNotice}`,
|
text: `${text}\n\nKontaktgrund: ${reason}\n\n${contactNotice}${closing ? `\n\n${closing}` : ""}`,
|
||||||
});
|
});
|
||||||
if (
|
if (
|
||||||
!result.accepted?.some(
|
!result.accepted?.some(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue