Email & SMTP Setup
v1.0.0
5 min read
11 views
Last updated: 4 hours ago
Email & SMTP Configuration
Configure email delivery for your marketplace notifications, order confirmations, and user communications.
Gmail SMTP Setup
Step 1: Enable 2-Step Verification
- Go to Google Account Settings
- Click on 2-Step Verification
- Follow the setup process
- Enable 2-Step Verification
Step 2: Generate App Password
- Go to App Passwords
- Select Mail from the app dropdown
- Select Other from device dropdown
- Enter "GigsRabbit" as the name
- Click Generate
- Copy the 16-character password (spaces don't matter)
Step 3: Configure in Admin Panel
- Go to
yourdomain.com/admin
- Navigate to Settings > SMTP
- Enter the following:
- Mail Driver: SMTP
- SMTP Host:
smtp.gmail.com
- SMTP Port:
587
- SMTP Username: Your full Gmail address
- SMTP Password: The 16-character app password
- Encryption: TLS
- From Email: Your Gmail or custom email
- From Name: Your marketplace name
- Click Save Changes
Step 4: Test Email
- Click Send Test Email button
- Enter your email address
- Check inbox (and spam folder)
- Verify email received
SendGrid SMTP Setup
Step 1: Create SendGrid Account
- Go to SendGrid.com
- Click Start for Free
- Complete registration
- Verify your email
Step 2: Verify Sender Identity
- Login to SendGrid Dashboard
- Go to Settings > Sender Authentication
- Choose Single Sender Verification
- Add and verify your sender email
Step 3: Create API Key
- Go to Settings > API Keys
- Click Create API Key
- Name it "GigsRabbit"
- Select Full Access
- Click Create & View
- Copy the API key (shown only once!)
Step 4: Configure in Admin Panel
- Go to
yourdomain.com/admin
- Navigate to Settings > SMTP
- Enter:
- Mail Driver: SMTP
- SMTP Host:
smtp.sendgrid.net
- SMTP Port:
587
- SMTP Username:
apikey
(literally this word) - SMTP Password: Your SendGrid API key
- Encryption: TLS
- From Email: Your verified sender email
- From Name: Your marketplace name
- Click Save Changes
Mailgun SMTP Setup
Step 1: Create Mailgun Account
- Go to Mailgun.com
- Click Start Sending
- Complete registration
- Add payment method (required even for free tier)
Step 2: Add Domain
- Go to Sending > Domains
- Click Add New Domain
- Enter your domain or use sandbox domain for testing
- Follow DNS verification steps
Step 3: Get SMTP Credentials
- Click on your domain
- Select SMTP option
- Note down:
- SMTP hostname:
smtp.mailgun.org
orsmtp.eu.mailgun.org
(EU) - Port: 587
- Username: Default SMTP Login
- Password: Click eye icon to view
- SMTP hostname:
Step 4: Configure in Admin Panel
- Go to
yourdomain.com/admin
- Navigate to Settings > SMTP
- Enter:
- Mail Driver: SMTP
- SMTP Host:
smtp.mailgun.org
- SMTP Port:
587
- SMTP Username: Your Default SMTP Login
- SMTP Password: Your password
- Encryption: TLS
- From Email:
noreply@yourdomain.com
- From Name: Your marketplace name
- Click Save Changes
Amazon SES Setup
Step 1: Setup AWS Account
- Go to AWS Console
- Sign in or create account
- Navigate to Amazon SES
Step 2: Verify Domain/Email
- Go to Verified Identities
- Click Create Identity
- Choose Domain or Email Address
- Follow verification steps
Step 3: Get SMTP Credentials
- Go to SMTP Settings
- Click Create SMTP Credentials
- Enter user name: "gigsrabbit-smtp"
- Download credentials CSV
Step 4: Configure in Admin Panel
- Go to
yourdomain.com/admin
- Navigate to Settings > SMTP
- Enter:
- Mail Driver: SMTP
- SMTP Host:
- US East:
email-smtp.us-east-1.amazonaws.com
- US West:
email-smtp.us-west-2.amazonaws.com
- EU:
email-smtp.eu-west-1.amazonaws.com
- US East:
- SMTP Port:
587
- SMTP Username: From credentials CSV
- SMTP Password: From credentials CSV
- Encryption: TLS
- Click Save Changes
Email Template Management
Available Templates
Your marketplace has pre-configured email templates for:
- Welcome Email - Sent when new user registers
- Order Confirmation - Sent to buyer after purchase
- Order Notification - Sent to seller for new orders
- Order Delivered - Sent when order is completed
- Withdrawal Request - Admin notification for withdrawals
- Password Reset - Password recovery emails
- Account Verification - Email verification links
Customizing Templates
- Navigate to Settings > Email Templates
- Select template to edit
- Modify:
- Subject Line
- Email Body (supports HTML)
- Variables (dynamic content)
- Preview changes
- Save template
Available Variables
Use these variables in templates:
{site_name}
- Your marketplace name{user_name}
- Recipient's name{order_id}
- Order reference number{amount}
- Transaction amount{service_title}
- Gig or project title{delivery_date}
- Expected delivery{buyer_name}
- Buyer's username{seller_name}
- Seller's username
Troubleshooting Email Issues
Emails Not Sending
- Check SMTP credentials - Verify all settings are correct
- Test connectivity - Use "Send Test Email" button
- Check logs - Review Laravel logs for errors
- Verify sender - Ensure "From Email" is verified
- Check spam folder - Emails might be filtered
Gmail Specific Issues
"Authentication failed"
- Regenerate app password
- Ensure 2-Step Verification is enabled
- Check if less secure apps is disabled
"Daily limit exceeded"
- Gmail limits: 500 emails/day for personal
- Consider upgrading to Google Workspace
- Switch to SendGrid or Mailgun
SendGrid Issues
"Sender not verified"
- Complete sender authentication
- Verify domain or single sender
- Check SendGrid dashboard for warnings
Common Solutions
- SPF Records - Add sender to domain SPF
- DKIM Signing - Enable DKIM for better delivery
- Use dedicated IP - For high volume sending
- Monitor reputation - Check sender score regularly
- Warm up IP - Gradually increase sending volume
Best Practices
- Always use SMTP over PHP mail()
- Verify sender domain for better deliverability
- Set up SPF, DKIM, DMARC records
- Monitor bounce rates and handle them
- Use transactional email service for production
- Keep templates simple and mobile-friendly
- Test across email clients (Gmail, Outlook, etc.)
- Include unsubscribe links where required
- Respect rate limits of email providers
- Monitor email analytics for engagement
Tags:
email
smtp
mail
notifications