Pixer Documentation
WelcomeTech We Have UsedGetting Started
Available Scripts & Command
How Can I use this app
Demo Deploy
Features
Settings
Payment
SEO and Analytics
API
Shop Transfer
WalletEmail ConfigurationMailgun ConfigurationGmail SMTP Configuration
Multilingual & Translation
FAQ PageContactTerms and conditions
Third-party Integrations
Deployment
Back-End Integration
Customizations
Update & Upgrade Guide
FAQSupportChange Log

Email Configuration

Laravel supports a variety of mail transport drivers to be used while sending an e-mail. Today we will walk you through two types of email service configuration step by step. We will discuss Mailgun and Gmail SMTP configuration here.

Mailgun Configuration

Sandbox domains are restricted to authorized recipients only. If you want to receive your email in sandbox account. Please authorize your email. Up to 5 Authorized Recipients can be added.

authorized-notice-image

For more information, Please follow Authorized Recipients

To setup and configure Mailgun you need to set these below .env keys. We will discuss how you can get those env variable from mailgun.

MAIL_MAILER=
MAIL_HOST=
MAILGUN_DOMAIN=
MAILGUN_SECRET=
MAIL_FROM_ADDRESS=
MAIL_PORT=587
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
ADMIN_EMAIL=support@example.com
  • MAIL_MAILER=mailgun

  • MAIL_HOST=smtp.mailgun.org

  • To get MAILGUN_DOMAIN Create or SignIn a Mailgun account from here https://login.mailgun.com/login After login click sending you will see a domain list there. I will go with this domain below. Just copy this domain and set this as your MAILGUN_DOMAIN

    mailgun-domain-image

  • Now to obtain MAILGUN_SECRET click on on that domain. You will redirect to an over page like below click on API Keys.

    mailgun-api-key-image

    Then it will redirect to page find Mailgun API keys then click on Add new key

    mailgun-create-key-image mailgun-get-api-key-image

  • To set MAIL_FROM_ADDRESS just type your mail address.

  • Now go to the dashboard -> sending -> Domain Click on the domain then select SMTP. You will see

MAIL_PORT=587
MAIL_USERNAME=null

configuration information there like below.

overview-smtp-config-image

  • In a Mailgun configuration, you typically don't need to specify a MAIL_PASSWORD because Mailgun uses API keys for authentication, not SMTP passwords. You can set MAIL_PASSWORD=null or remove it from your .env file.

  • Set your MAIL_ENCRYPTION MAIL_ENCRYPTION=tls

  • You can set your admin email ADMIN_EMAIL=your_email@example.com

Gmail SMTP Configuration

To setup Gmail SMTP Configuration you need to set these below .env keys. We will discuss how you can get those env variable from Gmail.

MAIL_MAILER=
MAIL_HOST=
MAILGUN_DOMAIN=
MAILGUN_SECRET=
MAIL_FROM_ADDRESS=
MAIL_PORT=587
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
ADMIN_EMAIL=support@example.com
  • MAIL_MAILER=smtp

  • MAIL_HOST=smtp.gmail.com

  • You can ignore MAILGUN_DOMAIN MAILGUN_SECRET for gmail.

  • To set MAIL_FROM_ADDRESS just type your mail address.

  • MAIL_PORT=587

  • To set MAIL_USERNAME=your@gmail.com just type your gmail address that you are using for configuration.

  • To get MAIL_PASSWORD from google Create or SignIn to a gmail account. Then go to your account or click the URL https://myaccount.google.com/security Then turn on 2-Step Verification.

    gmail-security-image

    Under 2-Step Verification settings you will see app passwords and click that -

    two-step-verification-image

    now set your application name under other (custom name)

    set-app-name-image

    after typing the name click on generate a propt will popup. like below That is your MAIL_PASSWORD copy that.

    generated-app-password-image

  • Set your MAIL_ENCRYPTION MAIL_ENCRYPTION=tls

  • You can set your admin email ADMIN_EMAIL=your_email@example.com