Note: Discuz! The email function is very important for webmasters. if you forget your password, you can retrieve it directly by email. The following describes how to set up the email function. I. Discuz! Three email sending methods are supported: 1. use sendmail of the PHP function (this method is recommended ).
Note: Discuz! The email function is very important for webmasters. if you forget your password, you can retrieve it directly by email. The following describes how to set up the email function.
I. Discuz! The following three email sending methods are supported:
1. using PHP functionsSendmailSend (recommended)
Note: This method uses the PHP function to send emails. you need to install the email system on the server. Generally, the VM has a built-in email system. Therefore, this method is recommended.
2. connect to the SMTP server through SOCKET (ESMTP verification is supported)
Note: This method is applicable to Windows or linux servers (applicable to virtual hosts or independent hosts) and supports ESMTP verification. The webmaster must have an SMTP server, for example, Foxmail's SMTP server.
3. send an Email using the PHP function SMTP (only valid on Windows hosts, ESMTP verification not supported)
Note: This method is only applicable to win hosts. It is not recommended because it has high requirements on the system environment.
Which method can users choose based on their own situations?
2. there are three separators in the mail header.
1. use CRLF as the separator (usually Windows host)
2. use LF as the separator (usually Unix/Linux host)
3. use CR as the separator (usually Mac host)
Note: Select a separator for the Mail header based on the email server system you are using.
III. next we will take the second mail sending method as an example to describe the whole process of setting up the mail function:
1. register an email address, such as Foxmail. the mailbox name is hellensu @ foxmail.com.
2. log on to Discuz! Background => webmaster => email settings, and select "connect to SMTP server via SOCKET (ESMTP verification supported)", as shown in:
Click"Add a new SMTP serverThen fill in the SMTP server, SMTP port, whether to verify, the sender mail address, SMTP Authentication username and SMTP authentication password information, here you can add multiple SMTP servers.
SMTP server: Enter the SMTP server address, for example, smtp.foxmail.com.
SMTP Port: The default value is generally 25. You can enter different SMTP ports.
Note: We recommend that you select "yes" for verification ".
Sender email address: Enter the sender's email address.
SMTP Authentication username: enter the same email address as above.
SMTP authentication password: enter the password of the mailbox.
3. use LF as the separator for the Mail header.
The recipient address contains the user name: Select"Yes"Will include the site user name in the recipient's email address.
All error messages in blocked emails: Select"Yes"Will block all error messages in emails.
IV. detection
If you want to know whether the configured email function members can normally receive emails, test the function.
After entering the sender and recipient's email address, click "check email sending settings". if the email is set successfully, a message is displayed, as shown in: