Email - System SMTP configuration - outgoing emails

This tutorial explains how to activate email on YetiForce ERP-CRM and how to configure the system SMTP for outgoing mail.
All fields of the SMTP configuration form will be described.

Default SMTP
It is possible to configure a default SMTP: it is recommended to configure it as the first in the list.

Why does YetiForce allow you to configure multiple SMTPs?
When sending emails via workflow, it is possible to define, from the workflow task configuration form, which SMTP to use for sending.
Each configuration allows you to define different behaviors, even on the same SMTP server.
The behaviors we can play on are:

  • Individual delivery
  • Sender name
  • Sender email
  • Reply to
  • Email priority
  • Confirmation of reading the message
  • Organization
  • Unsubscribe
  • Additional parameters
  • Do you want to save a sent email?
    • Host
    • Port
    • User name
    • Password
    • Folder
    • Do you want to validate the certificate?

For example, we can define different priorities depending on whether the email sent is of a commercial nature or a change of access credentials. Or we can save the emails in different IMAP folders.
Another example is the receipt of the confirmation of reading the message on different email addresses.

Let's go step by step.

Download the RoundCube libraries
The first step to do is to download the RoundCube libraries, that is the YetiForce email management engine.

  1. access the backend (BE) of YetiForce (YF)
  2. go to the page "Standard modules / Modules - Installation"
  3. click on the button at the top right "Download library"
  4. wait a few seconds until the button on the side changes to "Downloaded" (if the library is not downloaded, wait a few hours and try again)

Enable the module "My mailbox"
To check if the "My Mail" module is active:

  1. access the BE of YF
  2. go to the page "Standard modules / Modules - Installation"
  3. search for the "My mailbox" module
  4. if not enabled, check the box alongside

Description of the configuration fields
There are several fields in the SMTP configuration form. Only a few are required, while others are optional.
If you haven't got a deep knowledge and high experience, I suggest you to use certified providers and avoid installing and configuring your own email server in order not to run into dangerous internal and external security and spamming problems.

Let's see the configuration fields.

Name: the name to identify the type of SMTP and its characteristics, for example "GMail - myaccount@gmail.com - for automatic sending of email-marketing".
Mailer type: the mailer is the type of SMTP server that is used; this implies a different configuration depending on the use.

  • SMTP: connect to an SMTP server. Usually a free SMTP email service like Gmail, or your own company email server. In this case 5 parameters are required: Host, Port, Authentication. User name, Password and Safety Protocol. It is the most confortable and safe.
  • Sendmail: in this case it is necessary to have an MTA installed on your YF server. No other data is needed, but the MTA must be correctly configured to work as an FQDN SMTP server or it must be configured with a smarthost (this is the most frequent case). In practice it is identical to Mail and usually it's not available on Windows servers. Recommended if the MTA is configured with smarthost. No parameters required; but since the configuration form forces you to enter Port and Safety Protocol, even if not necessary, enter 465 as Port and ssl as Safety Protocol
  • Mail: in this case the PHP Mail command is used which relies on the default MTA installed on your YF server. No other data is needed, but the MTA must be correctly configured to work as an FQDN SMTP server or it must be configured with a smarthost (this is the most frequent case). In practice it is identical to Sendmail. Recommended if the MTA is configured with smarthost. No parameters required; but since the configuration form forces you to enter Port and Safety Protocol, even if not necessary, enter 465 as Port and ssl as Safety Protocol
  • Qmail: with this is necessary to enter, as for SMTP, Host, Port, Authentication, User name and Password and Safety Protocol of the Qmail server

Default: sets the configuration as default SMTP: it is used by the system as the default SMTP for sending emails whether multiple SMTP servers are configured. It is recommended to define it as first on the list.
Host: SMTP / Qmail server address - required Mailer type = SMTP / Qmail
Port: SMTP / Qmail server connection acceptance port - required Mailer type = SMTP / Qmail. The ports usually used are:

  • auth 25
  • ssl 465
  • tls 587

Authentication: to be checked if the SMTP server requires authentication. Currently, all SMTP servers require authentication
User name: username for authentication on the SMTP / Qmail server
Password: password for authentication on the SMTP / Qmail server
Individual delivery: tick if you want to send individually to each recipient, in case the email contains multiple recipients.
Safety protocol: communication security protocol with the SMTP server (ssl / tls). It depends on the server you are connecting to
Sender name: sender's Name - it appears as the sender's name in the recipient's email client
Sender email: sender's email address - appears as the sender's email in the recipient's email client
Reply to: destination email address if the recipient replies to the received email
E-mail priority: sending priority of emails sent with this configuration - Normal, Non-urgent, Urgent
Confirmation of reading the message: email address to which the recipient's "read receipt" message is delivered. If an address is entered, all system emails sent with this SMTP will automatically contain the read confirmation request.
Organization: company name inserted in the email header
Unsubscribe: unsubscribe option. Only some email clients support this option; for example Gmail webmail, Outlook eM Client. The "unsubscribe" option is included in the email. For example, if you are running an email campaign, from which recipients can withdraw, you can provide an address to collect all unsubscribe requests, or a web page that automatically unsubscribes.
The formats are:

  • `mailto:unsubscribe@example.com?subject=unsubscribe`
  • `https://www.example.com/unsubscribe`

Additional parameters: additional parameters to be sent to the SMTP server. This part is very technical and requires very good knowledge of the heading parameters that the SMTP server can accept and process.
Do you want to save a sent email?: check this option if you want to save the sent emails in a specific email address and specific folder, via IMAP access

  • Host: IMAP server address - The address must be entered in the format <protocol>://<domain>, where <protocol>=ssl or tls; eg ssl://imap.gmail.com
  • Port: IMAP server port. The ports usually used are:
    • auth 143
    • ssl 993
    • tls 143
  • Username: username of the account on the IMAP server
  • Password: password of the account on the IMAP server
  • Folder: path of the folder to save sent emails. It must be in the format: INBOX.<foldername>
  • Do you want to validate the certificate?: if checked, the ssl certificate of the server is checked at every IMAP access. It is advisable not to check this option, especially due to the high load required on the server and therefore possible slowdown of operations