Purchase Now
.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:

  1. Go to Google Account → Security
  2. Enable 2-Step Verification if not already enabled
  3. Go to App passwords
  4. Generate a new app password for "Mail"
  5. 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 notifications
  • subscription-confirmed.blade.php - New subscription confirmation
  • subscription-expiring.blade.php - Expiration reminder
  • payment-received.blade.php - Payment receipt
  • manual-payment-approved.blade.php - Manual payment approval
  • manual-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.log for 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