Zum Hauptinhalt springen

Emailing

Sending and receiving emails is one of the core functionalities of ConSol CM. The application interacts with one or more mail servers to fetch emails and send emails.

This section describes emailing in a single-server environment. Please contact the ConSol CM support or your ConSol CM consultant for information about emailing in a cluster.

Relevant components

In order to run smoothly, the following features of ConSol CM have to be taken into consideration on a server:

  • email has to be fetched
  • email has to be sent
info

The email configuration is explained in detail in the ConSol CM Administrator Manual, section Email.

Fetching emails

The following items are relevant for fetching emails:

  • Configured accounts: The accounts from which emails should be fetched must be configured in the Accounts tab of the Email configuration page in the Email menu of the Web Admin Suite.
  • Service: The NIMH service must be active, see Services page in the Operation menu of the Web Admin Suite.
  • Scripts: The email scripts for NIMH, e.g. NIMHCreateTicket.groovy, must exist, see Scripts page in the Business logic menu of the Web Admin Suite.
  • Data: Emails which cannot be processed are stored in the database table cmas_nimh_archived_mail. They are shown on the Failed incoming emails page of the Email menu in the Web Admin Suite. Emails, which cannot be saved to the database, e.g., due to their size, are saved in the file system (subfolder /mail/unstorable of the ConSol CM data directory) instead.
hinweis

ConSol CM only fetches emails which are marked as “unread” on the mail server.

Sending emails

The following items are relevant for sending emails:

  • Configured account: The account which should be used to send emails must be configured in the Settings tab of the Email configuration page in the Email menu of the Web Admin Suite.
  • Scripts: The email script of the queue, e.g. ChangeOutgoingMail.groovy, is applied for outgoing emails sent from the Web Client, see Scripts page in the Business logic menu of the Web Admin Suite.
  • Data: Emails which could not be sent are shown on the Failed outgoing emails page of the Email menu in the Web Admin Suite, where they can be retried. It is possible to intercept emails from non-production systems to avoid sending test emails to real customers. Such emails are shown on the Intercepted emails page of the Email menu in the Web Admin Suite.

Fine-tuning

Changing email addresses

You can view the defined email addresses in the Addresses tab of the Email configuration page in the Email menu of the Web Admin Suite. Two addresses are especially important:

  • Administrator email address: During the installation of ConSol CM, the administrator email address must be provided. It is used as a fallback if no specific email address is configured for a certain purpose later on. It is saved in the system property cmas-core-security, admin.email.
  • Reply-to address: Set the property cmweb-server-adapter, mail.reply.to to define a reply-to address which is used in all emails sent from ConSol CM.

Changing email parameters

The basic email parameters are changed on the Email configuration page of the Web Admin Suite. Advanced parameters are managed in system properties. They can be changed on the System properties page.

The following properties regarding email attachments are modified frequently:

  • Define the maximum attachment size: Set the maximum size in MB for attachments at cases, contacts, resources and incoming emails using cmas-core-server, attachment.max.size.

    Warning about large attachments

    Before allowing large attachments, please consider:

    • Large attachments increase the database size significantly.
    • If attachments are indexed (system property cmas-core-index-common, index.attachment is set to "true"), the indexing operation takes long for large attachments.
  • Define the allowed file types: Provide a comma-separated list of all allowed file extensions in cmas-core-server, attachment.allowed.types.

In addition, you should review the following parameters:

  • Decide whether emails should be deleted from the mail server: ConSol CM acts as a regular email client. In the system property cmas-nimh, mailbox.default.task.delete.read.messages you can define whether emails should be deleted from the mailbox on the email server after ConSol CM has fetched them. By default, this property is set to "false", so that emails are not deleted. Set this property to "true" to delete the emails which have been fetched by ConSol CM.

    tipp

    If you do not want ConSol CM to delete emails from the email server, you need to monitor the mailboxes to avoid a data overflow and server or performance problems. This is especially important because when fetching new emails, ConSol CM first has to retrieve a list of all emails in the mailbox to filter SEEN and new emails in the second step. When the first check takes longer than the polling interval (system property cmas-nimh, queue.task.interval.seconds), there might be a deadlock situation and no emails can be fetched anymore. Therefore, you should not keep too many SEEN messages in the mailbox.

  • Change the email polling interval: Define how often emails are polled using cmas-nimh, queue.task.interval.seconds. You might want to set a shorter interval if emails received by the mail server are not transferred to ConSol CM in the required time.

  • Change the timeout for connecting to the SMTP server: Define how long (in milliseconds) ConSol CM should wait for connecting to the SMTP server in cmas-core-server, mail.smtp.connectiontimeout.

  • Change the timeout for sending an email: Define how long (in milliseconds) ConSol CM should wait for an answer from the SMTP server after sending an email in in cmas-core-server, mail.smtp.timeout.

Monitoring

Errors in the email system are logged to the mail.log file. Received emails, which cannot be processed are shown on the Failed incoming emails page of the Web Admin Suite. Emails which could not be saved to the database, e.g., due to their size, are saved in the file system (subfolder /mail/unstorable of the ConSol CM data directory) instead.

When errors occur, the administrator receives an email notification. The address which should receive the notification is defined in the system property cmas-nimh-extension, mail.error.to.address.

If incoming emails are not processed correctly, please also check if the indexer is working correctly, see Index.