Email/SMTP Configuration

You will need to configure SMTP settings for Ultimate SMS if you want to send e.q. forget the password, two-step verification, subscriptions notification, etc… the SMTP config will act as a general email from Ultimate SMS for all emails that will be sent.

In order to configure the send email feature in Ultimate SMS navigate to Settings->All Settings->System Email.

Configuration options

Below you can read about the email configuration option to get more familiar with, however, in most cases, you will need to adjust only a few of them as mentioned in our examples below.

Email Protocol

SMTP and SendMail.

It’s highly recommended to configure the SMTP protocol for sending emails if you don’t want to encounter issues with emails going to spam or encoding, the examples below will be strictly for the SMTP protocol as it’s the recommended one.

Email Encryption

  • SSL – Select if you are configuring SMTP with port 465
  • TLS – Select if you are configuring SMTP with port 587
  • None – Select if you are configuring SMTP with port 25

To summarize, SSL works with port 465, TLS works with port 587 and if you are trying to configure the SMTP config with port 25 (non-secure) there will be no encryption and you should select None.


Enter your SMTP hostname.


Enter your SMTP port

Don’t mix up these modes; Email encryption set to SSL on port 587 or TLS on port 465 will not work.


Enter the SMTP email you are trying to configure as a general email for Ultimate SMS, in most cases, this will be a mail only used for sending emails from Ultimate SMS, e.q. you can create an email account with the name no-reply@ or info@, however, this is up to you to determine how best fit for your needs.

SMTP Username

Fill only if your email client uses a username for SMTP login, mostly you will fill this field if you are using an Exchange mailbox.

In most cases when you are using an exchange server, you will need to log in with a username not with an email address, in this case, Ultimate SMS will use the SMTP Username field to log in to your mail server instead of the email address, however, the Email address you filled above will be still used as a FROM header.

SMTP Password

Fill in the password for login, you should already know your password.



The below examples are general examples of how to configure SMTP to send an email, keep in mind that the examples may be different than your actual server requirements, the best is to consult with your hosting provider to provide you with the correct SMTP configuration.

SMTP server over port 25

Encryption: None
SMTP Host:
SMTP Port : 25
SMTP Email: Your email
SMTP Password: Your password

SMTP servers that require an SSL connection

Encryption: SSL
SMTP Host:
SMTP Port : 465
SMTP Email: Your email
SMTP Password: Your password

For Gmail use the following configuration:

Encryption: SSL
SMTP Host:
SMTP Port : 465 / For TLS encryption use port 587
SMTP Email:
SMTP Password: Your password

If you are using Gmail / G Suite you need to have enabled less secure apps in your account.


Common Issues & Troubleshooting

If you will receive an error message something like: “Connection failed. Error #2: stream_socket_client(): unable to connect to ssl:// (Connection refused) ” but this will depend on your mail server.

We highly recommend you to consult with your hosting provider if you are not able to configure SMTP for Ultimate SMS, the problem in most cases is related to your server config e.q. DNS failure, firewall blocking, hosting provider is blocking outbound connections, etc… you should talk to them, read their docs, in this case, only your hosting provider can help you!

You may want to perform a few types of research about the specific error message you are getting to get more familiar with how you can resolve this. ServerSMTP posted a good article and guides for common SMTP errors and codes.

Failed to connect to server: 111 Connection refused

Connection refused error is thrown directly from your mail server and may happen if your hosting provider is blocking outbound ports, SMTP, in most cases happens because of blocked ports via a firewall.

If you are configuring SMTP on ports 465 or 587, make sure that the ports 465 and 587 are open, if you are not managing the server, contact your hosting provider to check this directly.


Authentication failures

If your authentication is failing, there are several likely causes:

  • You have the wrong username or password
  • Your connection is being diverted to a different server (as above)
  • You have specified authentication without encryption

Generally, you do not want to send a username or password over an unencrypted link. Some SMTP authentication schemes do add a minimal level of security (sending short hashes rather than clear text), but these provide only minimal protection, and so most servers do not allow authentication without encryption. Fix this by setting SMTP Encryption to TLS and Port to 587 as well as filling the Email and Password field.

Common issues with Gmail or G Suite – Invalid username or password

Invalid username or password when using Gmail or G-Suite can be a common error if you haven’t turned Less Secure Apps to ON, however, it’s recommended first to check if your password is correct.


  1. Sign in to the Google Admin console.
  2. Click Security > Basic settings.
  3. Under Less secure apps, select Go to settings for less secure apps.
  4. In the subwindow, select the Allow users to manage their access to less secure apps radio button.
  5. In case you are not receiving the emails and your SMTP configuration test email is showing that the configuration is working properly, take a look at the following articles:

Gmail Regular Account

  1. Log in to your user account.
  2. Visit:
  3. Toggle on.

2 Factor Authentication Enabled

If you are have enabled 2-factor authentication on your Google Account, you MUST generate an application password and add the password in the password field in Ultimate SMS located in Settings -> All Settings -> System Email

Click here to read how to generate App Password.

If you are still getting invalid username or password and you are managing the server try this:

  1. Log in as a cPanel user, go to MX Entry, select domain, set to the remote exchanger.
  2. Log into WHM, go to Tweak Settings, disable “Restrict outgoing SMTP”

Restrict outgoing smtp to root exim

Could not instantiate mail function

This error is also known as “Unable to send email using PHP mail()” if you are using the Laravel mail engine and means that your PHP installation is not configured to call the mail() function correctly (e.g. sendmail_path is not set correctly in your php.ini), or you have no local mail server installed and configured.

However, the error may be shown if you are trying to configure the Mail protocol, which is not recommended.

SELinux blocking

If you see an error like SMTP -> ERROR: Failed to connect to server: Permission denied (13), you may be running into SELinux preventing PHP or the webserver from sending an email.


If you face any problem with this  please create a ticket on our support forum

Thank you!!