1. Bicom Systems
  2. Solution home
  3. PBXware
  4. HOWTOs

General :: HOWTO SMTP Setup

To enter the SMTP settings, please navigate to the Setup Wizard on port 81: 


http://PBXware_IP:81



In Setup Wizard, you will need to enter the details depending on your mail server. 


SMTP ports 


Port 25

SMTP port 25 continues to be used primarily for SMTP relaying. SMTP relaying is the transmission of email from an email server to an email server.


In most cases, modern SMTP email clients (Microsoft Outlook, Mail, Thunderbird, etc.) shouldn't use this port. It is traditionally blocked by residential ISPs and Cloud Hosting Providers, to curb the amount of spam that is relayed from compromised computers or servers. Unless you're specifically managing a mail server, you should have no traffic traversing this port on your computer or server. 


Port 465

IANA has reassigned a new service to this port, and it should no longer be used for SMTP communications.


However, because it was once recognized by IANA as valid, there may be legacy systems that are only capable of using this connection method. Typically, you will use this port only if your application demands it. A quick Google search, and you'll find many consumer Inbox Service Providers (ISPs) articles that suggest port 465 as the recommended setup. However, we do not recommend it, as it is not RFC-compliant.


Port 587

This is the default mail submission port. When users submit an email to be routed by a proper mail server, this is the one that will provide the best results.


Port 587, coupled with TLS encryption, ensures that email is submitted securely and follows the guidelines set out by the IETF.


E-mail account 


Enter the email address that would be associated with the SMTP server in question (e.g. for Gmail [email protected]


Server address 


Enter the SMTP server address (e.g. for Gmail smtp.gmail.com


Username/Password


Username for the authentication of the server in question. These fields can remain optional, depending on the server in question. For Gmail, you can enter the email address from the 'E-mail account' section and the password associated with that e-mail address. 


Example of Gmail configuration:



Encryption 


SSL vs. TLS: SSL and its successor, TLS, are protocols that encrypt internet traffic to make it secure for communication. Without encryption, anyone could read the confidential information being transmitted. With SSL and TLS, if an email is intercepted at any point, it’s rendered useless because its contents are encrypted. It’s common for these two technologies to be referred to as just SSL or SSL/TLS.


SSL/TLS work by initiating a series of handshakes with an email server when it receives an email. A handshake is an agreement between an email client — such as Gmail or Outlook — and a server to agree on the details of their connection. Handshakes require several detailed steps, from determining what version of SSL/TLS will be used and how the communication will be encrypted to establishing that a secure connection is in place before transferring the data.


After the handshake is completed, the email server returns a TLS digital certificate and public encryption key to the email client. The email client then verifies the certificate and creates a shared secret key (SSK), which is returned to the server. The server decrypts the SSK, which allows the transmission of emails.


STARTTLS: Before email encryption was standard, many connections between email clients and servers were insecure. The development of STARTTLS helped reduce the risk of stolen information by upgrading an existing insecure connection to a secure one using SSL/TLS. While STARTTLS has TLS in its name, it’s not necessary to use TLS; users can choose SSL instead.


The difference between SSL/TLS and STARTTLS is the latter is not a protocol but a command issued between an email program and a server. STARTTLS notifies a mail server that the contents of an email need to be encrypted. If the mail is intercepted, its contents and metadata are scrambled and difficult to decode. Once the transmission is received, the data will be decrypted. 

and To support only one port, STARTTLS emerged as a way for a client to connect over plain text, and then upgrade to a secure connection that used SSL/TLS. Ultimately, this posed many client and security problems. To remedy this, most services continued to use plain-text connections on one port number and offer secure, implicit SSL/TLS connections on a second one. Today, most users use implicit SSL/TLS with port 465 and upgrade their connection with STARTTLS using port 587.


Custom From Header


To use the From e-mail set on the Master Tenant/Slave Tenant level, this option needs to be checked. Otherwise, the 'From e-mail' that would be used is '[email protected]'.


Besides the above mentioned configuration we have added Oauth support for Google and Microsoft in our newest versions of PBXware,,



Now the user can select basic, google, or Microsoft type of authentication,





In PBXware version 7, the Oauth option has been added for Google and Microsoft 365 mail servers and the SMTP configuration page has been updated accordingly.


Although users can still use basic SMTP configuration to manually set up Gmail or Microsoft SMTP connection, the Oauth option has been added for Google and Microsoft mail servers.



NOTE: If STARTTLS is selected, Server Port should be set to 587. Alternatively, use port number 465.


If one of the Oauth authorization options is selected, the matching server address will auto-populate (smtp.gmail.com,smtp.office365.com). 


To proceed with configuration, you will have to enter a valid E-mail account.


 

Google - OAuth Authentication


The next step is to get the authorization code, to obtain it, you must click on the Get Code button.



Once the authorization code is acquired, paste it into the Auth code field and click the Get Token button.



If all fields are correctly populated, a notification that the token is generated will be displayed.



Click OK and then click Save to preserve the configuration.


 


Microsoft - OAuth Authentication for Office365


The next step is to get the authorization code, to obtain it, you must click on the Get Code button.



Once the authorization code is acquired, paste it into the Auth code field and click the Get Token button.



If all fields are correctly populated, a notification that the token is generated will be displayed.



Click OK and then click Save to preserve the configuration.


 


With everything in place, your PBXware should be ready to use the configured SMTP server and send e-mail notifications.


NOTE: Please note, for Google and Microsoft account setup, the e-mail address used must be the same as the one you used to log into your Google/Microsoft account.