Share by email uses company as sender

Objective

  • When someone uses Share by email from a repair list view, replies should go to the job contact who actually sent the share (the same person named in the email body), not only to the company mailbox—so client care is not forced to forward every thread.
  • Keep legitimate, deliverable outbound mail: decision needed on whether From stays company-branded on a verified domain while routing replies via Reply-To to the sender’s contact email (recommended pattern for SPF/DMARC), vs. changes to From display name only.

Background

  • Today, the envelope reads as company-sent because handleEmailJob in attik-backend/src/util/functions/emails/sendResendTemplate.ts builds from from verified company domain / company.name (when a Domain record exists), or falls back to a generic noreply-style address—not from the individual sharer. Reply-To is not set on the Resend payload, so Reply targets From.

  • The repair-list-share template (attik-backend/src/util/functions/emails/resendTemplates/repairListShareEmail.tsx) already names the sharer in the body via senderName / senderRole, populated from senderContactId on POST /repair-list/:id/view-link-send (attik-backend/src/routes/repairList.ts). The gap is reply routing, not necessarily missing copy in the body.

  • Product feedback: recipients perceive the company as the sender and reply there; client care must relay responses back to the original sender. Slack thread

  • Constraint: Putting an arbitrary contact address in From usually breaks authentication vs Resend + verified domains; Reply-To: <sender email> is the usual way to preserve deliverability while steering replies to the person.

Scope

Backend

  • attik-backend/src/routes/repairList.tsPOST /:id/view-link-send: already resolves senderName / senderRole from senderContactId and inspection people; extend the outbound mail contract so the send path can attach reply metadata (e.g. contact email for Reply-To when present).
  • attik-backend/src/util/functions/emails/sendResendTemplate.tshandleEmailJob: today sets from and to (+ cc/bcc) on CreateEmailOptions; add support for Resend’s reply-to field when template data supplies a sender address—decision needed on validation (contact must be on the job, must have email).
  • Related templates that reuse the same send helper should be reviewed so Reply-To is only set where product intends (may stay repair-list-share-only at first).

Frontend

  • attik-frontend/src/app/client/repair-list/[id]/view/components/ShareViewByEmailModal.tsx — already passes senderContactId when the portal provides it; confirm the selected sharer’s email is available server-side via inspection people (no need to expose in the client if the server derives it).

Product / architecture

  • Decision needed: Primary goal is Reply-To = sharer email (with From unchanged for auth), vs. also changing From display name (e.g. “Jane via {Company}”) for readability—second is optional polish.
  • Decision needed: Behavior when the sharer has no email or multiple roles—fallback to current behavior (reply to company) vs. block send.

References

  • Slack — share-by-email sender vs company
  • Resend API — reply_to / email payload fields (align with CreateEmailOptions in code)
  • attik-backend/src/routes/repairList.tsview-link-send
  • attik-backend/src/util/functions/emails/sendResendTemplate.ts
  • attik-backend/src/util/functions/emails/resendTemplates/repairListShareEmail.tsx
  • attik-frontend/src/app/client/repair-list/[id]/view/components/ShareViewByEmailModal.tsx

Please authenticate to join the conversation.

Upvoters
Status

Planned

Board
🏠

Main App

Date

16 days ago

Author

Linear

Subscribe to post

Get notified by email when there are changes.