# Mail Configuration

BeikeShop emails can be configured in Backstage-System Settings-Email Settings

img.png

The mail engines supported by BeikeShop are: SMTP, Sendmail, Mailgun

Note: The email address in the BeikeShop backend system settings-basic settings must be consistent with the user in the email settings

# QQ Mail

Enter QQ mailbox, click "Settings-Account"

img.png

Enable POP3/SMTP service, click the arrow to view the format, and generate the authorization code:

img.png

img.png

Get the SMTP server and port. Each mailbox has a different SMTP server.

img.png

Email configuration:

Enter BeikeShopBackstage-System Settings-Email Settings,select the email engine: SMTP, and fill in the following information in sequence

Host: smtp.qq.com

User: QQ mailbox

Password: Authorization code

Port: 465

Save after configuration

img.png

Note: The email address in the BeikeShop backend system settings-basic settings must be consistent with the user in the email settings

# 163Mailbox

Enter 163 mailbox. Click Settings-POP3/SMTP/IMAP

img.png

Enable POP3/SMTP service and generate authorization code

img.png

Get the SMTP server, the port is usually 465, except for special emails!

img.png

Email configuration:

Enter BeikeShopBackstage-System Settings-Email Settings, select the email engine: SMTP, and fill in the following information in sequence

Host: smtp.163.com

User: 163 mailbox

Password: Authorization code

Port: 465

Save after configuration

img.png

Note: The email address in the BeikeShop backend system settings-basic settings must be consistent with the user in the email settings.

# Gmail

Gmail are not applicable in China and will be directly rejected by Google.

Official reference document for Google mailboxes: https://support.google.com/mail/answer/7126229?visit_id=637245836154040494-1719467026&hl=zh-Hans&rd=1

First, you need to apply for a Google mailbox. The specific application steps will not be explained.

Set a dedicated SMTP password, https://security.google.com/settings/security/apppasswords

img.png

Email configuration:

Enter BeikeShopBackstage-System Settings-Email Settings, select the email engine: SMTP, and fill in the following information in sequence

Host: smtp.gmail.com

User: gmail mailbox

Password: gmail application-specific password

Port: 465

Save after configuration

img.png

Note: The email address in the BeikeShop backend system settings-basic settings must be consistent with the user in the email settings

Enable the queue to process email tasks. For specific queue configuration steps, please refer toQueue Configuration

img.png

# Email Configuration FAQ

1.How to change the sender of an email?

img.png

A: Modify the APP_NAME in the .env file in the root directory of the website

img.png

2.Registered user error: "Server Error"

img.png

Open the website debug, then register to see the error message [.env file in the website root directory APP_DEBUG=true]

The following error message appears:

img.png

A: The email address in the BeikeShop backend system settings-basic settings needs to be consistent with the user in the email settings.

img.png

The following error message appears:

img.png

A: (1) Check whether the SMTP server address or port is filled in correctly; (2) Check your server network, or whether the server has any restrictions on the port.

3.The user registration was successful, but no email was received

A:
(1)Check whether the queue is used. If the queue is used, you need to enable queue monitoring and check whether there is a failure (FAIL) message returned.

Execute the command to enable queue monitoring
php artisan queue:work -v 

(2)Disable the queue, turn on debug, and then register to view the error message to check the problem