Skip to main content

SMTP Configuration

By default MineTrax will try to send transactional emails via PHP mail, which might lead to various problems like ISP blocking, large droprate, email landing in spam., etc.

note

Transactional emails are the emails such as password resets, welcome email, opted in notification email, etc.

It is recommended to use a dedicated SMTP provider to do this job. Firstly you need to register at any SMTP providers and get your SMTP login details.

Here are list of some free SMTP Providers:

  1. SendGrid - 100 email a day free
  2. SendInBlue - 300 email a day free
  3. ElasticEmail - 100 email a day free
  4. Pepipost - 100 email a day free
  5. Gmail SMTP Server - 500 email per hour
  6. Amazon SES - 62000 a month if sent from Amazon hosted server
  7. and various others you can find by googling "Free SMTP Providers"

After you have register at any SMTP provider, you need to get your SMTP login details and then change the smtp credentials in the .env file.

MAIL_MAILER=smtp
MAIL_HOST= your smtp provider host
MAIL_PORT=your smtp provider port
MAIL_USERNAME= your smtp username
MAIL_PASSWORD= your smtp password
MAIL_ENCRYPTION= encryption mode (tls, ssl, null)
MAIL_FROM_ADDRESS=no-reply@your_domain.com

Example for Gmail:

MAIL_MAILER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=youremail@gmail.com
MAIL_PASSWORD=password
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=no-reply@yourdomain.com
caution

Emails are send in background via Queues. Queue are long running task and they don't pick up changes until restarted.

You must restart all queue workers after this change.

cd /var/www/minetrax
php artisan queue:restart