Keep a published rule when some invitation emails already went out, and only set Reply-To when the inviter address is a mailbox.
This commit is contained in:
1 parent
3c984e00c5
commit
ab6a0c807d
7 files changed
+161
-10
No files matched your search
+3
-1
@@ -8,6 +8,7 @@ import {
|
||||
import { getSmtpUrl } from "./env";
|
||||
import {
|
||||
buildRuleStakeholderInviteMail,
|
||||
stakeholderInviteReplyTo,
|
||||
type RuleStakeholderInviteMailInput,
|
||||
} from "./ruleStakeholderInviteMail";
|
||||
|
||||
@@ -102,12 +103,13 @@ export async function sendRuleStakeholderInviteEmail(
|
||||
input: RuleStakeholderInviteMailInput,
|
||||
): Promise<void> {
|
||||
const { subject, text, html } = buildRuleStakeholderInviteMail(input);
|
||||
const replyTo = stakeholderInviteReplyTo(input.inviterEmail);
|
||||
await sendHtmlMail({
|
||||
to: input.to,
|
||||
subject,
|
||||
text,
|
||||
html,
|
||||
replyTo: input.inviterEmail.trim().toLowerCase(),
|
||||
...(replyTo ? { replyTo } : {}),
|
||||
devLog: `[dev] Rule stakeholder invite (${input.communityName}) for ${input.to}: ${input.verifyUrl}`,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user