You will need to configure SMTP settings for Our CRM if you want to send e.q. invoices, estimates, overdue reminders etc… the SMTP config will act as a general email from Our CRM for all emails that will be sent.
In order to configure the send email feature in Our CRM navigate to Setup->Settings->Email.
Outlook/Office accounts are not supported for sending emails via SMTP as Microsoft dropped support for the regular SMTP connection.
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.
Our CRM offers two email engines, by default PHPMailer will be selected. The difference between mail engine is the libraries used to send emails from Our CRM.
If you decide to use PHPMailer (which is recommended), the responsible library for this will the popular php email library PHPMailer, you can read more about the library by clicking here
The other mail engine is the default Codeigniter framework library, more info can be found by clicking here
However, you should not worry about this that much, just select the one that you think fits for you.
SMTP, Sendmail, and Mail.
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.
· 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
Summarized, 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 Our CRM, in most cases, this will be a mail only used for sending emails from Our CRM, e.q. you can create an email account with name no-reply@ or info@, however, this is up to you to determine how best fit for your needs.
Fill only if your email client use username for SMTP login, mostly you will fill this field if you are using an exchange mailbox.
In most cases when you are using exchange server, you will need to log in with username not with the email address, in this case, Our CRM 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.
Fill the password for login, you should already know your password.
The default is UTF-8, you won’t need to change this ever, because in most cases this works fine, however, if you decide to change the encoding it’s highly recommended perform few researches to see what encoding is best fit for you.
You can add email to be added as BCC header if you want to keep track and get copies of all emails sent from Our CRM if you need to add multiple BCC emails, separate them by a comma.
Global email signature for all emails sent, can be used as merge field added in email templates in Setup->Email Templates, keep in mind this option can be overridden if e.q. the staff that is sending an invoice to an email have configured custom email signature in his profile.
Our CRM installation by default comes with a predefined header and predefined footer for all email templates, the predefined header and footer is pretty clean but if you need something more then this, feel free to adjust the code.
The email message contents are merged in between the predefined header and footer e.q.
[predefined header code]
The email message
[predefined footer code]
So for example, if you opened a <div> in the header and you did not close the <div> HTML while formatting the header, you MUST close (</div>) the HTML tag in the footer.
Click here to learn more about HTML
In case you are using AWS for sending emails, click here to learn more.
If you are looking in the Email Queue option, click here to read more.
Click here to read more about the email templates in Our CRM
The below examples are general examples how to configure SMTP to send an email, keep in mind that the examples may be different then your actual server requirements, the best is to consult with your hosting provider to provide you the correct SMTP configuration.
Encryption: None
SMTP Host: yoursmtphost.com
SMTP Port : 25
SMTP Email: Your email
SMTP Password: Your password
Encryption: SSL
SMTP Host: yoursmtphost.com
SMTP Port : 465
SMTP Email: Your email
SMTP Password: Your password
Encryption: SSL
SMTP Host: smtp.gmail.com
SMTP Port : 465 / For TLS encryption use port 587
SMTP Email: [email protected]
SMTP Password: Your password
If you are using your Google Account password to connect to SMTP, it’s highly recommended to update your password with an App Password to avoid any email sending disruptions, find more information on how to generate App Password for your Google Account at the following link: https://support.google.com/accounts/answer/185833?hl=en
If you need to test your SMTP setup just go to Setup -> Settings -> Email and scroll down to Send Test Email to enter your email address and click the submit button. If the SMTP is setup correctly you will receive green notifications saying that your email is set up correctly also an email will be sent to the email address you entered otherwise debug message from the email client will be shown.
After you configure the SMTP settings, you will need to test if the configuration is properly configured and it is working fine.
While you are in Setup->Settings->Email and scroll down to Send Test Email to enter your email address and click the submit button. If the SMTP is setup correctly you will receive green notifications saying that your email is set up correctly also an email will be sent to the email address you entered otherwise debug message from the email client will be shown.
When you try to send a test email, if the configuration is not successfully, you will be able to see an error block on the top, please read the debug block message carefully so you can determine what is causing your issue, the debug block message will contain the error message returned from your email server, in most cases will be something like: “Connection failed. Error #2: stream_socket_client(): unable to connect to ssl://smtp.gmail.com:465 (Connection refused) ” but this will depend on your mail server and the mail engine you are using (PHPmailer or Codeigniter), however, most of the error messages will be similar.
We highly recommend you to consult with your hosting provider if you are not able to configure SMTP for Our CRM, 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, also it’s highly recommended to check the PHPMailer troubleshooting guide by clicking here
This can happen because of firewall rules configured on your web server, because in Setup->Settings->Email in the predefined option header and footer there is an HTML and the firewall is preventing this HTML saves into the database.
To test this you can navigate to Setup->Settings->Email and leave blank the predefined header and footer options then try to save the settings to see if this will work fine.
If the save is successful, you should try to consult with your hosting provider to disable such firewall rules, in most cases, this can happen because of the mod_security or Suhosin.
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.
More information:
https://github.com/PHPMailer/PHPMailer/issues/295#issuecomment-155147551
https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
Click here to read more.
GoDaddy blocks outbound SMTP; you have to use GoDaddy’s own mail servers.
Click here to read more.
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 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.
Invalid username or password when use 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:
1. https://productforums.google.com/forum/#!topic/Apps/M7TiKQAWhq4
2. https://support.google.com/a/answer/55299?hl=en
1. Log in to your user account.
2. Visit: https://www.google.com/settings/security/lesssecureapps
3. Toggle on.
If you are have enabled 2-factor authentication on your Google Account, you MUST generate application password and add the password in the password field in Our CRM located in Setup->Settings->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 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”
This error is also known as “Unable to send email using PHP mail()” if you are using the Codeigniter 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.
Click here to read more.
However, the error may be shown if you are trying to configure the Mail protocol, which is not recommended.
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 web server from sending an email.
Click here to read more.