← back to Pitch Guard
PitchGuard: explicitly send/draft from info@designerwallcoverings.com
9b5953da3cbca07d52ffffe52335a02fcb8d48b3 · 2026-06-18 15:56:47 -0700 · Steve Abrams
Pin From to 'Designer Wallcoverings <info@designerwallcoverings.com>' on
both /api/send and /api/followup/create so outbound can never fall back to
a Gmail default. (Sends already resolved to info@ via George's account
mapping; this makes it explicit and override-proof.)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Files touched
Diff
commit 9b5953da3cbca07d52ffffe52335a02fcb8d48b3
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Thu Jun 18 15:56:47 2026 -0700
PitchGuard: explicitly send/draft from info@designerwallcoverings.com
Pin From to 'Designer Wallcoverings <info@designerwallcoverings.com>' on
both /api/send and /api/followup/create so outbound can never fall back to
a Gmail default. (Sends already resolved to info@ via George's account
mapping; this makes it explicit and override-proof.)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---
server.js | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/server.js b/server.js
index c632a02..df2ce50 100644
--- a/server.js
+++ b/server.js
@@ -47,6 +47,8 @@ const AUTH = process.env.GEORGE_BASIC_AUTH || '';
// "Send followup" behind nginx basic-auth, so we pass the token on every send.
const EXT_SEND_TOKEN = process.env.GEORGE_EXTERNAL_SEND_TOKEN || '';
const ACCOUNT = 'info'; // info@designerwallcoverings.com
+// Always send/draft AS info@ — pin it explicitly so it can never fall back to a Gmail default.
+const FROM = process.env.PITCHGUARD_FROM || 'Designer Wallcoverings <info@designerwallcoverings.com>';
if (!GEORGE || !AUTH) {
console.error('Missing GEORGE_URL / GEORGE_BASIC_AUTH — copy .env.example to .env and fill it in.');
process.exit(1);
@@ -483,7 +485,7 @@ app.post('/api/send', async (req, res) => {
if (real.length) replyToMessageId = real[real.length - 1].id;
} catch { /* fall back to plain threadId send */ }
}
- const payload = { account: ACCOUNT, to, subject, body, no_source_tag: true, ...(EXT_SEND_TOKEN ? { send_approval_token: EXT_SEND_TOKEN } : {}), ...(threadId ? { threadId } : {}), ...(replyToMessageId ? { replyToMessageId } : {}) };
+ const payload = { account: ACCOUNT, from: FROM, to, subject, body, no_source_tag: true, ...(EXT_SEND_TOKEN ? { send_approval_token: EXT_SEND_TOKEN } : {}), ...(threadId ? { threadId } : {}), ...(replyToMessageId ? { replyToMessageId } : {}) };
if (!EXT_SEND_TOKEN) console.warn('[send] GEORGE_EXTERNAL_SEND_TOKEN not set — external sends will be blocked by George.');
const sent = await george('/api/send', { method: 'POST', body: payload });
// durable record: the date + the actual letter we sent this person
@@ -537,7 +539,7 @@ app.post('/api/followup/create', async (req, res) => {
return res.status(409).json({ error: 'blocked: contact already transacted (' + risk.labels.join(', ') + ') — not drafting a quote followup', risk: risk.labels });
}
const subj = /^re:/i.test(subject || '') ? subject : 'Re: ' + (subject || 'your inquiry');
- const out = await george('/api/drafts', { method: 'POST', body: { account: ACCOUNT, to, subject: subj, body: FOLLOWUP_BODY, no_source_tag: true } });
+ const out = await george('/api/drafts', { method: 'POST', body: { account: ACCOUNT, from: FROM, to, subject: subj, body: FOLLOWUP_BODY, no_source_tag: true } });
candCache = null; // invalidate so a rescan reflects the new draft
draftsCache = null;
res.json({ ok: true, draft: out });
← 1e95bac PitchGuard: red 'already sent' alert + 4th Already-Sent colu
·
back to Pitch Guard
·
auto-save: 2026-06-23T09:50:51 (1 files) — server.js.tmp 7e21c18 →