Email/SMTP Configuration


You will need to configure SMTP settings for CRM if you want to send e.q. invoices, estimates, overdue reminders etc… the SMTP config will act as a general email from CRM for all emails that will be sent.

In order to configure the send email feature in Your CRM navigate to Setup->Settings->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.

Mail Engine

CRM offers two email engines, by default PHPMailer will be selected. The difference between mail engine is the libraries used to send emails from 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.

Email Protocol

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.

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

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.

SMTP Host

Enter your SMTP hostname.

SMTP Port

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.

Email

Enter the SMTP email you are trying to configure as a general email for CRM, in most cases, this will be a mail only used for sending emails from 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.

SMTP Username

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, 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.

SMTP Password

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

Email Charset

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.

BCC All Emails To

You can add email to be added as BCC header if you want to keep track and get copies of all emails sent from CRM if you need to add multiple BCC emails, separate them by a comma.

Email Signature

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.

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

AWS Email SMTP Setup

In case you are using AWS for sending emails, click here to learn more.

Email Queue

If you are looking in the Email Queue option, click here to read more.

Email Templates

Click here to read more about the email templates in CRM

Examples

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.

SMTP server over port 25

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

SMTP servers that require SSL connection

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

For Gmail use the following configuration:

Encryption: SSL
SMTP Host: smtp.gmail.com
SMTP Port : 465 / For TLS encryption use port 587
SMTP Email: youremail@gmail.com
SMTP Password: Your password

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

Testing SMTP Setup

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.

Common Issues & Troubleshooting

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 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

Email settings not saving or getting 404 error when saving

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.

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.

More information:

https://github.com/PHPMailer/PHPMailer/issues/295#issuecomment-155147551

https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting

Connection Timeout Error and DNS Failures

Click here to read more.

GoDaddy Email Config Issues

GoDaddy blocks outbound SMTP; you have to use GoDaddy’s own mail servers.

Click here to read more.

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 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 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.

G-SuiteAvez-vous trouvé cet article utile ?



  • Email/SMTP Configuration

    You will need to configure SMTP settings for CRM if you want to send e.q. invoices, estimates, overdue reminders etc… the SMTP config will ac...

  • Configuration Outlook

    Configuration Outlook 2013 Démarrage Voici comment réaliser votre configuration en POP avec SSL activé. Vo...

  • Configuration Email Pro et Exchange

    Paramètres POPNom de serveur : xxxx.xxx.com Port : 995Méthode de chiffrement : SSLParamètres IMAPNom du serveur : xxxx.xxx.comPor...

2024 Copyright UNIVERSAL SOFTWARE