|
| 1 | +--- |
| 2 | +title: Mailer |
| 3 | +description: Stormkit Mailer is a simple email service that allows you send transactional emails with ease. |
| 4 | +--- |
| 5 | + |
| 6 | +# Mailer |
| 7 | + |
| 8 | +Stormkit Mailer is designed to provide a straightforward way to send transactional emails directly from your application. This feature is ideal for sending automated notifications, password resets, and other essential email communications. |
| 9 | + |
| 10 | +With just a few configuration settings, you can connect Stormkit Mailer to your SMTP provider and start sending emails quickly and reliably. |
| 11 | + |
| 12 | +## Configuration |
| 13 | + |
| 14 | +- Navigate to the Environments tab and select the environment (e.g., production or staging) where you want to set up email functionality. |
| 15 | +- Go to Config > Mailer Configuration. |
| 16 | + |
| 17 | +In the Mailer Configuration panel, you will find the following fields. Fill them out according to your SMTP provider’s details: |
| 18 | + |
| 19 | +| Setting | Description | |
| 20 | +| ------------- | ----------------------------------------------------------------------------------------------------- | |
| 21 | +| **SMTP Host** | Enter the hostname of your SMTP server | |
| 22 | +| **SMTP Port** | Set the port for your SMTP server. Common ports are 587 (TLS), 465 (SSL) | |
| 23 | +| **Username** | Enter the username for SMTP authentication. Typically the email address associated with your account. | |
| 24 | +| **Password** | Enter the password for SMTP authentication. Ensure this is securely stored and not shared publicly. | |
| 25 | + |
| 26 | +## Testing the Configuration |
| 27 | + |
| 28 | +After entering your SMTP credentials, click the `Send test email` button to verify the configuration. |
| 29 | + |
| 30 | +You should receive a confirmation email if the SMTP settings are correct. If there’s an error, double-check your SMTP settings or contact your SMTP provider for assistance. |
| 31 | + |
| 32 | +Once you’re satisfied with the settings, click `Save` to store the SMTP configuration for your environment. |
| 33 | + |
| 34 | +## Example (Gmail) |
| 35 | + |
| 36 | +| Setting | Value | |
| 37 | +| --------- | ------------------------------------------------------------------------- | |
| 38 | +| SMTP Host | smtp.gmail.com | |
| 39 | +| SMTP Port | 587 | |
| 40 | +| Username | your-email@example.com | |
| 41 | +| Password | Your Gmail app password (if using 2FA, generate an app-specific password) | |
| 42 | + |
| 43 | +## Sending emails programmatically |
| 44 | + |
| 45 | +- Generate an API key for your environment: **Environment** > **Config** > **API Keys** |
| 46 | +- Refer to our [API documentation](/docs/api/mailer) |
| 47 | + |
| 48 | +## Additional Notes |
| 49 | + |
| 50 | +- SMTP Security: Ensure that your SMTP credentials are kept secure and only accessible by authorized personnel. |
| 51 | +- App Passwords for Gmail: If you’re using Gmail as your SMTP provider and have two-factor authentication (2FA) enabled, you’ll need to create an app-specific password in your Google account. |
| 52 | + |
| 53 | +## Troubleshooting: |
| 54 | + |
| 55 | +If you encounter issues, confirm the following: |
| 56 | + |
| 57 | +- Your SMTP host and port are correct. |
| 58 | +- Your email provider supports the port and authentication type you’ve selected. |
| 59 | +- Any firewall or security settings on your network allow outbound SMTP traffic. |
| 60 | + |
| 61 | +For further assistance, refer to your SMTP provider’s documentation or reach out to us. |
0 commit comments