Skip to content

move from mailgun to make webhook for email sending - #137

Closed
interim17 wants to merge 3 commits into
mainfrom
make-contact
Closed

interim17 wants to merge 3 commits into
mainfrom
make-contact

Conversation

@interim17

Copy link
Copy Markdown
Contributor

Problem

We trialed Mailgun as an email relay but have a better solution through Central IT's Make account.

Solution

This has been tested in local dev against the published Make webhook, and the necessary env vars have been added to netlify.

We can continue to iterate on the wording and formatting of the email.

@netlify

netlify Bot commented Sep 16, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for project-idea-board ready!

Name Link
🔨 Latest commit 5984fcc
🔍 Latest deploy log https://app.netlify.com/projects/project-idea-board/deploys/6ab1764b4a83f100083537f1
😎 Deploy Preview https://deploy-preview-137--project-idea-board.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@interim17
interim17 marked this pull request as ready for review September 18, 2026 17:43
@interim17
interim17 requested review from meganrm and a lite review from Copilot September 18, 2026 17:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Address the two moderate issues in netlify/functions/contact.mts.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Moves contact-email delivery from Mailgun/Netlify to a Make webhook.

Changes:

  • Adds Make webhook delivery with API-key authentication and timeout handling.
  • Adds escaped HTML email rendering.
  • Removes the Netlify email plugin, configuration, dependencies, and legacy template.
File summaries
File Summary
yarn.lock Removes obsolete email-plugin dependencies.
package.json Removes the Netlify email plugin.
netlify/lib/contact-email.ts Renders escaped contact-email HTML.
netlify/functions/contact.mts Sends requests through Make; requires shared timeouts for upstream calls and validation of optional ideaTitle as a string.
netlify.toml Removes email plugin configuration.
emails/contact/index.html Removes the legacy template.
Review details

Suppressed comments (1)

netlify/functions/contact.mts:40

  • This timeout only covers the Make request; the Google token exchange and Sheets lookup above still use uncapped fetch calls. If either upstream call stalls, the function can exceed Netlify's 10-second limit and be terminated before it reaches this timeout, so the client may see a platform timeout while the lookup/request remains in flight. Use one request deadline (or pass a shared AbortSignal/timeouts) across all external calls, not just the final webhook.
// Under Netlify's 10s function limit, so we return 502 rather than being killed
const WEBHOOK_TIMEOUT_MS = 8_000;
  • Files reviewed: 5/6 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

replyTo: body.senderEmail,
subject: `Idea Board: message from ${body.senderName}`,
html: renderContactEmail({
ideaTitle: body.ideaTitle ?? "N/A",
@interim17 interim17 closed this Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants