Mailer
Purpose: Document email integration for notifications and user communications.
Contents - Supported mail drivers - SMTP configuration - Email notifications - Testing and troubleshooting - Sources
Supported mail drivers¶
Firefly III supports multiple email backends:
Driver | Use Case | Configuration Complexity | Source |
---|---|---|---|
smtp |
Production recommended | Medium | "Firefly III Configuration" — https://docs.firefly-iii.org/how-to/firefly-iii/installation/self-hosted/ — retrieved 2025-01-09 |
log |
Development/testing | Low | "Firefly III Configuration" — https://docs.firefly-iii.org/how-to/firefly-iii/installation/self-hosted/ — retrieved 2025-01-09 |
sendmail |
Local server setup | Low | "Firefly III Configuration" — https://docs.firefly-iii.org/how-to/firefly-iii/installation/self-hosted/ — retrieved 2025-01-09 |
mailgun |
Mailgun service | Medium | "Firefly III Configuration" — https://docs.firefly-iii.org/how-to/firefly-iii/installation/self-hosted/ — retrieved 2025-01-09 |
postmark |
Postmark service | Medium | "Firefly III Configuration" — https://docs.firefly-iii.org/how-to/firefly-iii/installation/self-hosted/ — retrieved 2025-01-09 |
SMTP configuration¶
Environment variables:
Variable | Purpose | Example | Required |
---|---|---|---|
MAIL_MAILER |
Mail driver selection | smtp | Yes |
MAIL_HOST |
SMTP server hostname | smtp.gmail.com | Yes (SMTP) |
MAIL_PORT |
SMTP server port | 587, 465, 25 | Yes (SMTP) |
MAIL_USERNAME |
SMTP authentication username | user@example.com | Yes (SMTP) |
MAIL_PASSWORD |
SMTP authentication password | (from secrets) | Yes (SMTP) |
MAIL_ENCRYPTION |
Encryption method | tls, ssl, null | Recommended |
MAIL_FROM_ADDRESS |
Sender email address | noreply@example.com | Yes |
MAIL_FROM_NAME |
Sender display name | Firefly III | Yes |
Common SMTP configurations:
Provider | Host | Port | Encryption | Notes |
---|---|---|---|---|
Gmail | smtp.gmail.com | 587 | tls | Requires app password |
Outlook | smtp-mail.outlook.com | 587 | tls | Modern authentication |
SendGrid | smtp.sendgrid.net | 587 | tls | API key as password |
Mailgun | smtp.mailgun.org | 587 | tls | SMTP credentials |
AWS SES | email-smtp.region.amazonaws.com | 587 | tls | IAM credentials |
Docker Compose configuration:
1 2 3 4 5 6 7 8 9 10 |
|
Email notifications¶
Firefly III sends emails for:
Event | Description | Frequency | Can Disable |
---|---|---|---|
Registration | New user account creation | Once | No |
Password Reset | Password reset requests | On demand | No |
Budget Alerts | Budget overspend notifications | Configurable | Yes |
Bill Reminders | Upcoming bill notifications | Configurable | Yes |
Report Generation | Automated report delivery | Scheduled | Yes |
Data Import | Import completion notifications | Per import | Yes |
Notification preferences: - Users can configure notification preferences in their profile - Admins can set system-wide default notification settings - Email frequency can be adjusted per notification type
Testing and troubleshooting¶
Test email functionality:
1 2 3 |
|
Debugging email issues:
-
Check logs:
1 2 3 4 5
# View application logs docker logs firefly-iii-application.application | grep -i mail # View Laravel logs docker exec firefly-iii-application.application tail -f storage/logs/laravel.log
-
Verify SMTP connectivity:
1 2 3 4 5 6
# Test SMTP connection docker exec firefly-iii-application.application php -r " $smtp = fsockopen('smtp.example.com', 587, $errno, $errstr, 30); echo $smtp ? 'SMTP reachable' : 'SMTP unreachable: ' . $errstr; if ($smtp) fclose($smtp); "
-
Common issues:
- Authentication failures: Check username/password credentials
- TLS errors: Verify encryption settings and certificate validity
- Port blocking: Ensure firewall allows outbound SMTP traffic
- Rate limiting: Check provider rate limits and daily quotas
Log driver (development):
When using MAIL_MAILER=log
, emails are written to Laravel logs instead of being sent:
1 2 |
|
Security considerations¶
Best practices: - Use application-specific passwords (Gmail, Outlook) - Enable two-factor authentication on email provider - Use TLS encryption for SMTP connections - Rotate SMTP credentials regularly - Monitor for bounce/rejection rates
Avoid common pitfalls: - Don't use personal email accounts for system notifications - Don't hardcode email passwords in configuration files - Don't use unencrypted SMTP connections (port 25) - Don't ignore SPF/DKIM/DMARC setup for deliverability
Sources¶
- "Firefly III Configuration Reference" — https://docs.firefly-iii.org/how-to/firefly-iii/installation/self-hosted/ — retrieved 2025-01-09
- "Laravel Mail Configuration" — https://laravel.com/docs/mail — retrieved 2025-01-09