netlify email integration with mailgun (email trunk)#91
Open
interim17 wants to merge 8 commits intofeature/contact-queryfrom
Open
netlify email integration with mailgun (email trunk)#91interim17 wants to merge 8 commits intofeature/contact-queryfrom
interim17 wants to merge 8 commits intofeature/contact-queryfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds Netlify Email Integration (Mailgun) support so the site’s contact form can send templated emails via Netlify’s built-in emails function, and documents local/prod setup for developers.
Changes:
- Added
@netlify/plugin-emailsand configured Netlify to include the emails build plugin. - Updated the
contactNetlify Function to render/send an email via/.netlify/functions/emails/contact. - Added an email template (
emails/contact/index.html) plus developer docs and a sample.envfor local setup.
Reviewed changes
Copilot reviewed 8 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| yarn.lock | Locks new dependencies introduced by the Netlify emails plugin. |
| src/components/ContactModal.tsx | Includes ideaTitle in the contact request payload for better email context. |
| package.json | Adds @netlify/plugin-emails to support Netlify’s email integration. |
| netlify/functions/contact.mts | Implements email sending by calling the internal Netlify emails endpoint. |
| netlify.toml | Registers the Netlify emails build plugin. |
| gatsby/utils/gatsby-resolver-utils.js | Minor export formatting tweak. |
| emails/contact/index.html | Adds the Handlebars email template used by the emails integration. |
| docs/NETLIFY.md | Documents Netlify CLI/linking and required env vars for email integration. |
| docs/.env.example | Provides local env var template for Mailgun/Netlify emails integration. |
| .gitignore | Ignores local .env file. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Closes #44, #61, #62, and #63
Reviewers: only Megan and I have access to the netlify back end right now, please feel free to just read and review without confirming the function is performing as advertised.
Solution
Signed us up for a
mailgunaccount and configured the necessary environment variables to use netlify email integration:https://docs.netlify.com/extend/install-and-use/setup-guides/email-integration/#required-environment-variables
Added an email template in
/emailsper above docs.Added a
/docsdirectory to start storing more case-specific advice for devs and LLMs that might previously have gone in README or CONTRIBUTING. We're using this pattern inaics-limsand I like it.When testing this locally I was able to successfully send an email to my personal gmail through the contact form.
CONTACT_IDEA_BOARDis still the only contactId -> email mapping that is provisioned on the backend.If testing this be aware that our domain for
mailgunis a sandbox that gets flagged as spam. We will need to work with infra and/or central IT to provision a domain or subdomain for this project.