Configure Discuz! email

更新时间:
复制 MD 格式

Configuring the Discuz! email feature for your website allows visitors to reset their passwords by email. This topic describes how to configure the Discuz! email feature, using a SOCKET connection to an SMTP service as an example.

Prerequisites

  1. You have installed the Discuz! X forum on a virtual host.

  2. Make sure that the PHP function fsockopen is enabled.

Note

The PHP function fsockopen is enabled by default. For more information, see Configure PHP.INI parameters.

Procedure

  1. Configure the email sending method.

    1. Log on to the Discuz! admin panel.

    2. In the top menu bar, click Administrator.

    3. In the left navigation pane, click Email Settings.

    4. On the Email Settings page, in the Email sending method section, select Send through a SOCKET connection to the SMTP server (ESMTP authentication supported).

    5. Click Add new SMTP server.

    6. Configure the server information.

      For Email sending method, select Send through a SOCKET connection to the SMTP server (ESMTP authentication supported). For Email header delimiter, select Use LF as a delimiter (usually for Unix/Linux hosts). For Recipient's email address contains username, select Yes. For Suppress all error messages during email sending, select Yes. After you complete the configuration, click Submit.

      The following table describes the main parameters.

      Parameter

      Description

      Example

      SMTP server

      Enter the address of the SMTP server that requires an SSL-encrypted connection.

      Contact your email provider to confirm that the server address uses the SSL protocol.

      ssl://smtp.163.com

      Port

      Enter the port number for the SMTP server. The default port for unencrypted SMTP is 25, but SSL connections typically use 465.

      Contact your email provider to confirm the port number for an SSL connection.

      465

      Sender's email address

      Enter the sender's email address.

      example*@163.com

      SMTP authentication username

      Contact your email provider to confirm the correct username.

      example*

      SMTP authentication password

      Contact your email provider to determine whether the password:

      • is the same as your email account password by default.

      • is configured separately.

      password123456

    7. In the Email header delimiter section, select Use LF as a delimiter (usually for Unix/Linux hosts).

    8. Click Submit.

  2. Test the configuration.

    1. Click the Test tab.

    2. Enter a sender's email address and a recipient's email address, then click Test Email Sending Settings.

      If the settings are correct, the system displays a success message.