Setting Up Email Notifications
To enable email notifications with Mailgun in your Startup Template project, follow these steps to obtain the necessary environment variables.
Create a Mailgun Account
Sign Up for Mailgun:
Go to Mailgun and sign up for an account.
Set Up Your Domain:
After signing up, set up your domain within the Mailgun dashboard.

Mailgun domains
Obtain Mailgun API Keys
Retrieve Your Domain Information:
Once your domain is set up, navigate to your domain settings in the Mailgun dashboard.
Get Your Domain Details:
Note down your Mailgun domain, sender email address.
Generate Mailgun API key from api_security page.

Mailgun api keys
Add to .env File
Open Your .env File:
Open your project's
.envfile.
Add Mailgun Environment Variables:
Add the following variables to your
.envfile:
Example .env File
Here is an example of what your .env file should look like after adding Mailgun environment variables:
Final Steps
Save Your Changes:
Save the changes to your
.envfile.
Restart Your Server:
If your server is already running, restart it to apply the changes.
Test Email Notifications:
Verify that email notifications are working as expected in your project.
Additional Resources
Need Help?
If you have any feedback or run into any issues, don't hesitate to reach out at [email protected].
Happy coding!
Last updated
Was this helpful?