Setting up SMTP email in TNG
Posted: Wed Jul 04, 2018 11:38 am
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.
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.
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.
- E-mail Address:
Enter the email address you want to use for your contact information.
- 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.
- 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.
- Notify on reviewable submissions:
Set this to yes if you want to be notified when a user submits an edit or suggestion.
- 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.
- 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.
- Send acknowledgement email:
Enable this feature to send a registration acknowledgement to users.
- Include password in welcome email:
Enable this feature to send the users password in the registration is approved email.
- 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.
- SMTP host name:
If you are going to use SMTP you must enter a host name for your server or email provider.
- 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.
- Mail password:
Enter the account password for the email provider.
- 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).
- 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
<?php
phpinfo();
?>
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.