FireMail-Webhook is an open-source project designed to send email notifications using Firebase Functions whenever an email sent through Mailgun is delivered, opened, or clicked. It leverages Mailgun's webhook feature to trigger Firebase Functions, which then use Nodemailer to dispatch notifications.
- Email Delivery Notifications: Get notified when your emails are successfully delivered.
- Email Interaction Tracking: Receive alerts when recipients open or click on links within your emails.
- Secure & Scalable: Built on Firebase Functions for secure and scalable email event handling.
- Customizable Notifications: Easy to customize email notification content for different event types.
- A Firebase account and a Firebase project.
- A Mailgun account with SMTP and webhook configuration.
- Node.js (version 18 or later recommended).
-
Clone the Repository
git clone https://github.com/imasimali/FireMail-Webhook.git cd FireMail-Webhook
-
Configure Firebase
- Set up Firebase CLI and login to your Firebase account.
- Initialize Firebase in your project directory if you haven't already.
-
Set Environment Variables
Configure your Mailgun SMTP credentials and Firebase project details as GitHub secrets for secure deployment.
SMTP_EMAIL
: Your Mailgun SMTP email.SMTP_PASS
: Your Mailgun SMTP password.FIREBASE_PROJECT
: Your Firebase project ID.FIREBASE_TOKEN
: Your Firebase CI token.
-
Deploy to Firebase
Push your changes to the
main
branch to automatically deploy your Firebase functions using GitHub Actions.
Configure your Mailgun webhook to send events to your Firebase function's endpoint. The function will process these events and send email notifications accordingly.
We welcome contributions! Please feel free to fork the repository, make changes, and submit pull requests. You can also open issues for bugs, feature requests, or documentation improvements.
This project is open source and available under the MIT License.