Documentation
Email Configuration
Configure SMTP for email notifications, password resets, and user invitations in FeedbackBin.
Configure SMTP to enable email notifications, password resets, and user invitations.
SMTP Settings
Variable | Purpose | Example |
---|---|---|
SMTP_HOST |
SMTP server hostname | smtp.gmail.com |
SMTP_PORT |
SMTP server port | 587 (StartTLS), 465 (SSL) |
SMTP_USERNAME |
SMTP authentication username | [email protected] |
SMTP_PASSWORD |
SMTP authentication password | your-app-password |
SMTP_DOMAIN |
HELO domain | example.com |
SMTP_AUTHENTICATION |
Authentication method | plain , login , cram_md5 |
SMTP_ENABLE_STARTTLS_AUTO |
Use StartTLS | true |
Popular Email Providers
Gmail/Google Workspace
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USERNAME=[email protected]
SMTP_PASSWORD=your-app-password
SMTP_DOMAIN=gmail.com
SMTP_AUTHENTICATION=plain
SMTP_ENABLE_STARTTLS_AUTO=true
Note: Use an App Password instead of your regular password.
SendGrid
SMTP_HOST=smtp.sendgrid.net
SMTP_PORT=587
SMTP_USERNAME=apikey
SMTP_PASSWORD=your-sendgrid-api-key
SMTP_DOMAIN=your-domain.com
SMTP_AUTHENTICATION=plain
SMTP_ENABLE_STARTTLS_AUTO=true
Mailgun
SMTP_HOST=smtp.mailgun.org
SMTP_PORT=587
SMTP_USERNAME=your-mailgun-username
SMTP_PASSWORD=your-mailgun-password
SMTP_DOMAIN=your-domain.com
SMTP_AUTHENTICATION=plain
SMTP_ENABLE_STARTTLS_AUTO=true
Postmark
SMTP_HOST=smtp.postmarkapp.com
SMTP_PORT=587
SMTP_USERNAME=your-server-token
SMTP_PASSWORD=your-server-token
SMTP_DOMAIN=your-domain.com
SMTP_AUTHENTICATION=cram_md5
SMTP_ENABLE_STARTTLS_AUTO=true
Using Rails Credentials
For secure credential storage, use Rails credentials:
EDITOR=nano bin/rails credentials:edit --environment production
smtp:
host: "smtp.gmail.com"
port: 587
username: "[email protected]"
password: "your-app-password"
domain: "your-domain.com"
authentication: "plain"
enable_starttls_auto: true
Testing Email Configuration
Test your email setup from the Rails console:
# Access Rails console
bin/rails console
# Test email delivery
ActionMailer::Base.mail(
from: '[email protected]',
to: '[email protected]',
subject: 'FeedbackBin Test Email',
body: 'This is a test email from FeedbackBin.'
).deliver_now
Troubleshooting
Email not sending
- Test SMTP connection manually
- Check firewall allows outbound SMTP ports (587, 465)
- Verify SMTP credentials and settings
Authentication failures
- Ensure you’re using app passwords for Gmail
- Check username/password are correct
- Verify authentication method matches provider requirements
SSL/TLS errors
- Use port 587 with StartTLS for most providers
- Use port 465 for SSL connections
- Check
SMTP_ENABLE_STARTTLS_AUTO
setting