EmailManager

Email not getting routed when agent goes available.

Issue description:

Agent goes available on TMAC, but emails that are in Queue are not routed.

Troubleshooting steps:

  • Ensure, max TMAC tab limit is not reached for email channels. Count the total number of email tabs open and then compare with the actual number of tabs allowed for an agent using OCM Agent settings module or in the database as shown below,

TMAC Agent Profile table

  • Ensure, TMAC to WorkQueue connection is proper and is not broken.
    • To verify this, open TMAC configuration file then look for WorkQueue service endpoint address, copy the endpoint address and run it in a browser. If there is any error or page displays blank, then you may need to look into WorkQueue service status by checking WorkQueue logs. There might be a possibility that you are referring to the wrong WorkQueue endpoint address. To verify this, check the following step.
    • Go to Workqueue service config file and check for baseAddress, compare this base address with endpoint address configured in the TMAC server. It must be the same, if not change the configuration and restart the respective service.

 

The SMTP address has no mailbox associated with it.

Issue Description:

This error might occur when the email manager tries to connect for a given email account but fails to connect.

An error message

Troubleshooting steps:

  • Ensure, configured email accounts, username and password are valid.
    • Confirm if the email account license is valid and not expired.
    • Run SQL script use[databasename] select * from Email_AccountConfiguration, a result output of the script will be similar to this

 

  • Run https://outlook.office365.com/ews/exchange.asmx in browser the address, pop up will appear requesting for username and password. Provide configured username and password and click OK as shown below,

  • On click of OK, if you are able to observe below the screen, it means provided credentials are valid and there is no issue with login.

  • If you are not getting a page like above, then the email account is no more valid. Please check with the respective team to get a valid email account with proper credentials.

 

Email Send error codes in logs when sending out emails via EmailManager

a) Issue Description:

Sending out emails via EmailManager could fail due to various reasons. In these cases, you will see log entry as below

finalRet:[{"code":<other than 0>,"message":"<other than success>","sessionid":"","rid":"<rid value>"}]

b) Troubleshooting

Code and MessageReasonResolution
"code":-20, "message":"mailbox not enabled"Mailbox used to send email is not enabled in Email_AccountConfiguration TableEnabled column value should be 1 for the mailbox
"code":-21, "message":"mailbox sending out not enabled"Send is not enabled for the Mailbox used to send email in Email_AccountConfiguration tableSendEnabled column value should be 1 for the mailbox
"code":-23, "message":"exception in smtp send"Mail Sending through configured SMTP server address failedSMTP server address in OutboundMailServerAddress and SMTP Port in OutboundMailServerPort columns should be checked for correctness
"code":-26, "message":"ews send failed"Mail Sending through configured EWS server address failed due to incorrect EWS configurations or due to EWS not reachableEWS server address in OutboundMailServerAddress and EWS Port in OutboundMailServerPort columns should be checked for correctness.
"code":-30, "message":"provided email account not found"Mailbox through which mail is being sent is not configured in Email_AccountConfiguration tableUse a Valid mailbox configured or add/configure the unavailable mailbox account into the table
"code":-31, "message":"mailbox parameter cannot be empty"Mailbox name in the email send request was not providedMailbox name in the request coming to EMM cannot be empty and should contain one of the enabled and valid Mailbox account name
"code":-32, "message":"mailTo parameter cannot be empty"MailTo in the email send request was not providedMailTo should have a email address to which email has to be sent, cannot be empty or null
"code":-50, "message":"att url null"Attachment section of the email send request doesn’t contain information of the attachment to be sent with emailattachmentFileList.attachmentList.URL in the request should contain file urls or base64 code of the files
"code":-51, "message":"att filetype null"Attachment section has file data but not the file typeattachmentFileList.attachmentList.fileType in the request should contain file type being sent
"code":-52, "message":"att name null" Attachment section is missing attachment nameattachmentFileList.attachmentList.name in the request should contain name for file being sent

401-Unauthorized or 404 Not Found received in EWS authentication

a) Issue Description:

EmailManager logs show one of the following error

ERROR EWSEmailAdapter.EWSEmailClient - Exception in ConnectToExchangeServer:Microsoft.Exchange.WebServices.Data.ServiceRequestException: The request failed. The remote server returned an error: (401) Unauthorized. ---> System.Net.WebException: The remote server returned an error: (401) Unauthorized.

OR

ERROR EWSEmailAdapter.EWSEmailClient - Exception in ConnectToExchangeServer:Microsoft.Exchange.WebServices.Data.ServiceRequestException: The request failed. The remote server returned an error: (404) Not Found. ---> System.Net.WebException: The remote server returned an error: (404) Not Found.

b) Cause

EmailManager received EWS authentication failure for the mailbox configured in Email_AccountConfiguration table

c) Troubleshooting

    1. This normally happens at the startup of the Email Manager Service. 401 error is the result of an incorrect password configured for the email account in Email_AccountConfiguration table and 404 is the result of invalid MailAccount Name.
    2. Ensure to have proper details in Email_AccountConfiguration table for MailAccountName, IncomingMailServerUserName, IncomingMailServerPassword, OutboundMailServerAddress, OutboundMailServerPassword. These details can be updated from OCM's Email Account Configuration Module.

Where can we configure max email poll limit?

No, this is not configurable as we have limited this number to 10 at the application level.

As a standard approach, Email Manager (EMM) application will only poll max of 10 emails for each request to EWS.