Skip to content

Email Settings

Email Settings allow you to configure how your application sends emails. This guide covers SMTP configuration, email templates, and notification settings.


Table of Contents

  1. Accessing Email Settings
  2. SMTP Configuration
  3. Mail Driver Options
  4. Email Templates
  5. Email Notifications
  6. Testing Email
  7. Common Email Providers
  8. Troubleshooting

Accessing Email Settings

From Admin Panel

  1. Log in to admin panel
  2. Navigate to SettingsEmail Settings
  3. Or go directly to: /admin/settings/email

Permissions Required

  • Manage Settings: manage-settings permission

SMTP Configuration

Why Use SMTP

Benefits:

  • More reliable delivery
  • Better deliverability
  • Professional appearance
  • Tracking capabilities
  • Less likely to be marked as spam

SMTP Settings

Mail Driver

Select: SMTP (recommended for production)

SMTP Host

Common Hosts:

  • Gmail: smtp.gmail.com
  • Outlook: smtp-mail.outlook.com
  • Yahoo: smtp.mail.yahoo.com
  • Custom: Your mail server hostname

SMTP Port

Common Ports:

  • 587: TLS (recommended)
  • 465: SSL
  • 25: Unencrypted (not recommended)

Encryption

Options:

  • TLS: For port 587 (recommended)
  • SSL: For port 465
  • None: Not recommended

Username

  • Your full email address
  • Example: your-email@gmail.com

Password

  • Your email password
  • Gmail: Use "App Password" if 2FA enabled
  • Keep secure, don't share

From Address

From Email

  • Email address to send from
  • Usually your main email
  • Example: noreply@yourdomain.com

From Name

  • Name shown in "From" field
  • Example: Your Company Name
  • Appears in recipient's inbox

Mail Driver Options

Best For: Production environments

Configuration:

  • Requires SMTP server
  • Most reliable
  • Best deliverability

Sendmail

Best For: Servers with sendmail configured

Configuration:

  • Uses server's sendmail
  • No additional setup
  • Less reliable than SMTP

Mail (PHP Mail)

Best For: Development only

Limitations:

  • Poor deliverability
  • Often marked as spam
  • Not recommended for production

Email Templates

Accessing Templates

  1. Go to SettingsEmail Templates
  2. Or navigate to: /admin/email-templates

Available Templates

System Templates:

  • User Registration
  • Password Reset
  • Order Confirmation
  • Appointment Confirmation
  • Ticket Notification
  • And more...

Editing Templates

  1. Click Edit on template
  2. Modify:
    • Subject: Email subject line
    • Body: Email content
    • Variables: Dynamic content
  3. Preview changes
  4. Click Save

Template Variables

Common Variables:

  • {name} - User name
  • {email} - User email
  • {app_name} - Application name
  • {app_url} - Application URL
  • {reset_link} - Password reset link
  • And more...

Template Features

  • Rich Text Editor: Format email content
  • HTML Support: Full HTML emails
  • Preview: See how email looks
  • Test Send: Send test email
  • Version History: Track changes

Email Notifications

Notification Types

User Notifications

  • Registration: Welcome email
  • Password Reset: Reset link
  • Email Verification: Verification link
  • Account Updates: Profile changes

Order Notifications

  • Order Confirmation: Order received
  • Order Shipped: Shipping notification
  • Order Delivered: Delivery confirmation
  • Invoice: Payment receipt

System Notifications

  • Appointment Reminders: Before appointments
  • Ticket Updates: Ticket status changes
  • Course Updates: Course notifications
  • Task Assignments: Task notifications

Configuring Notifications

  1. Go to SettingsNotification Settings
  2. Enable/disable notifications
  3. Configure per notification type
  4. Set notification preferences
  5. Save settings

See: Notification Settings


Testing Email

Send Test Email

  1. In Email Settings
  2. Click Send Test Email
  3. Enter test email address
  4. Click Send
  5. Check inbox (and spam folder)

Verify Configuration

Check:

  • Email received
  • From address correct
  • Formatting looks good
  • Links work
  • Images display

Common Issues

Not Received:

  • Check spam folder
  • Verify email address
  • Check SMTP settings
  • Review error logs

Formatting Issues:

  • Check HTML in template
  • Test in different email clients
  • Verify CSS compatibility

Common Email Providers

Gmail

Configuration:

Host: smtp.gmail.com
Port: 587
Encryption: TLS
Username: your-email@gmail.com
Password: App Password (if 2FA enabled)

App Password Setup:

  1. Enable 2FA in Google Account
  2. Go to Security → App Passwords
  3. Generate app password
  4. Use as SMTP password

Outlook/Hotmail

Configuration:

Host: smtp-mail.outlook.com
Port: 587
Encryption: TLS
Username: your-email@outlook.com
Password: Your password

cPanel Email

Configuration:

Host: mail.yourdomain.com
Port: 587
Encryption: TLS
Username: your-email@yourdomain.com
Password: Your email password

Custom SMTP

Configuration:

Host: smtp.yourdomain.com (or provided host)
Port: 587 or 465
Encryption: TLS or SSL
Username: Your SMTP username
Password: Your SMTP password

Get from:

  • Your hosting provider
  • Your email service provider
  • Your IT department

Troubleshooting

Emails Not Sending

Solutions:

  1. Check SMTP Settings:

    • Verify host, port, username, password
    • Test connection
    • Check encryption type
  2. Check Server Configuration:

    • Verify PHP mail functions enabled
    • Check firewall settings
    • Review server logs
  3. Check Email Logs:

    • View Laravel logs
    • Check mail server logs
    • Review error messages

Emails Going to Spam

Solutions:

  1. SPF Record:

    • Add SPF record to DNS
    • Authorize sending server
  2. DKIM:

    • Set up DKIM signing
    • Verify domain
  3. From Address:

    • Use domain email (not Gmail/Outlook)
    • Match domain with site
  4. Content:

    • Avoid spam trigger words
    • Don't use all caps
    • Include unsubscribe link

Connection Errors

Solutions:

  1. Verify Credentials:

    • Double-check username/password
    • Test in email client first
  2. Check Port:

    • Try port 587 (TLS)
    • Try port 465 (SSL)
    • Verify with provider
  3. Firewall:

    • Ensure port not blocked
    • Check server firewall
    • Contact hosting provider

Best Practices

Security

  1. Use App Passwords:

    • For Gmail with 2FA
    • More secure
    • Can revoke easily
  2. Keep Credentials Secure:

    • Don't share passwords
    • Use environment variables
    • Regular password updates
  3. Monitor:

    • Check email logs
    • Monitor failed sends
    • Review bounce rates

Deliverability

  1. Use Domain Email:

    • Better reputation
    • Professional appearance
    • Higher deliverability
  2. Warm Up Domain:

    • Start with low volume
    • Gradually increase
    • Build reputation
  3. Monitor Reputation:

    • Check spam scores
    • Monitor bounce rates
    • Review feedback


Last Updated: [Date will be updated during final review]

Released under the MIT License.