Merge branch 'dev'
CI/CD / deploy (push) Failing after 2m51s
Details
CI/CD / deploy (push) Failing after 2m51s
Details
This commit is contained in:
commit
c6ae38d0d7
|
|
@ -75,8 +75,9 @@ export async function sendSpaceNotification(
|
|||
// Filter out excluded DIDs' emails if needed
|
||||
const recipients = options?.excludeDids ? emails : emails;
|
||||
|
||||
const fromAddr = `MI Agent <${space}-agent@rspace.online>`;
|
||||
const replyTo = options?.replyTo || `${space}-agent@rspace.online`;
|
||||
const agentAddr = `${space}-agent@rspace.online`;
|
||||
const fromAddr = `MI Agent <${agentAddr}>`;
|
||||
const replyTo = options?.replyTo || agentAddr;
|
||||
|
||||
await transport.sendMail({
|
||||
from: fromAddr,
|
||||
|
|
@ -84,6 +85,7 @@ export async function sendSpaceNotification(
|
|||
subject,
|
||||
html: htmlBody,
|
||||
replyTo,
|
||||
envelope: { from: agentAddr, to: recipients },
|
||||
});
|
||||
|
||||
console.log(`[AgentNotify] Sent "${subject}" to ${recipients.length} members of ${space}`);
|
||||
|
|
|
|||
|
|
@ -460,8 +460,8 @@ async function executeApproval(docId: string, approvalId: string) {
|
|||
replyTo: agentReplyTo,
|
||||
subject: approval.subject,
|
||||
text: approval.bodyText,
|
||||
// Envelope override: authenticate as SMTP_USER but show mailboxEmail in From header
|
||||
envelope: { from: SMTP_USER || 'noreply@rmail.online', to: approval.toAddresses },
|
||||
// Envelope aligned with From header so rspamd DKIM-signs with the mailbox's domain (DMARC alignment)
|
||||
envelope: { from: mailboxEmail, to: approval.toAddresses },
|
||||
};
|
||||
|
||||
if (approval.ccAddresses.length > 0) {
|
||||
|
|
|
|||
|
|
@ -282,13 +282,15 @@ async function sendEmailNotification(stored: StoredNotification, opts: NotifyOpt
|
|||
</p>
|
||||
</div>`;
|
||||
|
||||
const agentAddr = `${space}-agent@rspace.online`;
|
||||
try {
|
||||
await transport.sendMail({
|
||||
from: fromAddr,
|
||||
to: userEmail,
|
||||
subject: stored.title,
|
||||
html,
|
||||
replyTo: `${space}-agent@rspace.online`,
|
||||
replyTo: agentAddr,
|
||||
envelope: { from: agentAddr, to: userEmail },
|
||||
});
|
||||
await markNotificationDelivered(stored.id, 'email');
|
||||
console.log(`[email] Sent "${stored.title}" to ${opts.userDid}`);
|
||||
|
|
|
|||
|
|
@ -2228,7 +2228,7 @@ spaces.post("/:slug/invite", async (c) => {
|
|||
await inviteTransport.sendMail({
|
||||
from: `${slug} <${agentAddr}>`,
|
||||
replyTo: agentAddr,
|
||||
envelope: { from: process.env.SMTP_USER || "noreply@rmail.online", to: body.email },
|
||||
envelope: { from: agentAddr, to: body.email },
|
||||
to: body.email,
|
||||
subject: `${inviterName} invited you to "${slug}" on rSpace`,
|
||||
html: `
|
||||
|
|
@ -2358,7 +2358,7 @@ spaces.post("/:slug/members/add", async (c) => {
|
|||
await inviteTransport.sendMail({
|
||||
from: `${slug} <${agentAddr}>`,
|
||||
replyTo: agentAddr,
|
||||
envelope: { from: process.env.SMTP_USER || "noreply@rmail.online", to: targetEmail },
|
||||
envelope: { from: agentAddr, to: targetEmail },
|
||||
to: targetEmail,
|
||||
subject: `${inviterName} invited you to "${slug}" on rSpace`,
|
||||
html: `
|
||||
|
|
|
|||
|
|
@ -5922,7 +5922,7 @@ app.post('/api/invites/identity', async (c) => {
|
|||
await smtpTransport.sendMail({
|
||||
from: agentAddr ? `${spaceSlug} <${agentAddr}>` : CONFIG.smtp.from,
|
||||
...(agentAddr ? { replyTo: agentAddr } : {}),
|
||||
...(agentAddr ? { envelope: { from: CONFIG.smtp.user, to: email } } : {}),
|
||||
...(agentAddr ? { envelope: { from: agentAddr, to: email } } : {}),
|
||||
to: email,
|
||||
subject: subjectLine,
|
||||
html: `
|
||||
|
|
|
|||
Loading…
Reference in New Issue