Setting up SMTP email in TNG

Posts: 132
Joined: Sun Oct 01, 2017 3:08 pm

Setting up SMTP email in TNG

Post by steven »

Setting up SMTP email and registration in TNG is a simple process if the server is configured correctly and you have the correct port, user name, password and authentication protocol. Some hosts block ports, so it's a good idea to verify the SMTP ports are not blocked. If the ports are blocked you will not be able to use SMTP email but may be able to use an alternate such as gmail. You can save yourself a headache by contacting your email provider or host and get the correct port number and authentication protocol. Once you have the correct information, log in to the administrator control panel and select Mail and Registration.


  1. E-mail Address:
    Enter the email address you want to use for your contact information.

  2. Send all mail from address above:
    This email is used for the contact us page. The email address for each assigned tree will override this address even if you select yes when sending mass emails.

  3. Allow new user registrations:
    Select yes to allow new users to register. If you set this option to NO, new users will not be able to register but can be added manually by an administrator.

  4. Notify on reviewable submissions:
    Set this to yes if you want to be notified when a user submits an edit or suggestion.

  5. Create new tree for user:
    Setting this option to yes will create a new tree when the user registers. TNG allows you to have multiple trees however users can only view the tree to which they are assigned.

  6. Auto approve new users:
    Set this option to yes if you want users approved automatically. If set to no you will need to manually approve newly registered users.

  7. Send acknowledgement email:
    Enable this feature to send a registration acknowledgement to users.

  8. Include password in welcome email:
    Enable this feature to send the users password in the registration is approved email.

  9. Use SMTP authentication:
    You must enable this option to use SMTP (Simple Mail Transport Protocol) authentication. However, depending on your host or server configuration SMTP may not be required. If you want to use SMTP enable this feature by selecting yes.

  10. SMTP host name:
    If you are going to use SMTP you must enter a host name for your server or email provider.

  11. Mail username:
    This is the user name used to log in to your email provider. It can be the same address used for the email address above.

  12. Mail password:
    Enter the account password for the email provider.

  13. Port number:
    Enter the outgoing port number for you email provider. The normal ports for outgoing SMTP email are 25 (non-encrypted) or 465 (SSL) and 587 (TLS).

  14. Encryption:
    Many email providers require encryption. If you are unsure contact your provider to confirm their requirements. It is best use either SSL or TLS encryption. There are other options such as SSL, TLS and STARTTLS. SSL (Secure Sockets Layer) and its successor TLS (Transport Layer Security) are standard protocols used to secure email transmissions. These protocols encrypt connections between two computers over the internet. This stops any third parties from spying on these conversations.
    STARTTLS is a Channel Security Upgrade for safer delivery of message. It tells an email server that an email client (including an email client running in a web browser) wants to turn an existing insecure connection into a secure one.


Using email in TNG is fairly straight forward provided the port and encryption methods are correct and there are no server issues. Run phpinfo.php to ensure mailparse is enabled. If you do not have this file you can create one using Komodo IDE or NotePad++. Do not use a wordprocessor program or notepad or any editor that adds a BOM (Byte Order Mark) in the file. Add the code below in your phpinfo.php file and place on your website.

Code: Select all

Launch phpinfo.php in your browser and scroll down to make sure mailparse is enabled.


While you're there you can also see other SMTP settings, which you should not need to change.


To check PHP on a Synology device login to DSM and open Web Station and select PHP Settings. Select the version of PHP and then select edit.Scroll down and make sure mailparse is checked as shown below.


If you are on a hosted server, check with your host to ensure they have the correct php extensions, ports and settings enabled for your website.

If you are running TNG with WordPress and SMTP emails are not working check SMTP email error when running TNG from WordPress.