Email Configuration
Configure SMTP settings for email verification, price alerts, and notifications.
.env
MAIL_MAILER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=your-email@gmail.com
MAIL_PASSWORD=your-app-password
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=your-email@gmail.com
MAIL_FROM_NAME="${APP_NAME}"
To create an App Password:
- Go to Google Account → Security
- Enable 2-Step Verification if not already enabled
- Go to App passwords
- Generate a new app password for "Mail"
- Use this 16-character password in MAIL_PASSWORD
SendGrid
.env
MAIL_MAILER=smtp
MAIL_HOST=smtp.sendgrid.net
MAIL_PORT=587
MAIL_USERNAME=apikey
MAIL_PASSWORD=your-sendgrid-api-key
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=noreply@yoursite.com
MAIL_FROM_NAME="${APP_NAME}"
Note: Username is literally "apikey" (not your email).
Email Templates
Email templates are located in resources/views/emails/. You can customize them to match your branding.
Template Files
price-alert.blade.php- Price alert notificationssubscription-confirmed.blade.php- New subscription confirmationsubscription-expiring.blade.php- Expiration reminderpayment-received.blade.php- Payment receiptmanual-payment-approved.blade.php- Manual payment approvalmanual-payment-rejected.blade.php- Manual payment rejection
Customizing Templates
All templates extend the base layout in resources/views/emails/layouts/. Customize the base layout to change the overall email design.
Troubleshooting
Emails Not Sending
- Check
storage/logs/laravel.logfor error messages - Verify SMTP credentials are correct
- Ensure firewall allows outbound connections on port 587/465
- For Gmail, use App Password instead of regular password
- Check if queue worker is running (if using queues)
Emails Going to Spam
- Set up SPF, DKIM, and DMARC records for your domain
- Use a consistent "From" address
- Avoid spam trigger words in subject lines
- Include an unsubscribe link in marketing emails