Troubleshooting Email Connectivity - Sending emails

Once you have email up and running you might run into a situation where users are not receiving emails. This article gives some tips on how to troubleshoot email issues if this occurs.

1. Check Status Monitor screen for Sending Email

The Status Monitor screen provides information on your system such as usage and errors. If you have errors in your email setup then the Status Monitor provides information on that.

1.1. Admin menu > Status Monitor

Status Monitor via Admin menu

1.2. Status Monitor for Sending email error

Status Monitor for Sending Email error

The Status Monitor displays error information for your email setup. Each time you refresh this page, the system attempts to connect to the email server.

  1. If an error occurs then it displays in email server section. Clicking on Fail will display error
  2. Example error
  3. Any emails not sent should reside in the Queue and can be corrected in that section

1.3. Email error and possible causes

The following is a list of email errors with possible causes

 1. phpnetwork_getaddresses: getaddrinfo failed: Name or service not known

Error encountered when Sending mail: phpnetwork_getaddresses: getaddrinfo failed: Name or service not known Check setting of SEND_MAIL_ variables in /var/www/iv/engine/config/const.php

Cause: Incorrect value for SEND_MAIL_SERVER

 

2. Error: authentication failed: authentication failure

Error encountered when Sending mail: 5.7.8 Error: authentication failed: authentication failure Check setting of SEND_MAIL_ variables in /var/www/iv/engine/config/const.php.

Cause: Incorrect value for SEND_MAIL_LOGIN, SEND_MAIL_PASSWORD

 

3. Username and Password not accepted

Error encountered when Sending mail: 5.7.8 Username and Password not accepted. Learn more at 5.7.8 http://support.google.com/mail/bin/answer.py?answer=14257 yn4sm25783434pbb.95 - gsmtp Check setting of SEND_MAIL_ variables in /var/www/iv/engine/config/const.php.

Cause: Incorrect value for SEND_MAIL_LOGIN, SEND_MAIL_PASSWORD

 

4. Network is unreachable

Error encountered when Sending mail: Network is unreachable Check setting of SEND_MAIL_ variables in /var/www/iv/engine/config/const.php.

Cause: Incorrect value for SEND_MAIL_SERVER, SEND_MAIL_PORT

 

5. Failed to parse address

Error encountered when Sending mail: Failed to parse address "smtp.gmail.com:" Check setting of SEND_MAIL_ variables in /var/www/iv/engine/config/const.php.

Cause: Incorrect or no value for SEND_MAIL_PORT

 

6. Error: authentication not enabled

Error encountered when Sending mail: 5.5.1 Error: authentication not enabled Check setting of SEND_MAIL_ variables in /var/www/iv/engine/config/const.php.

Cause: Incorrect value for SEND_MAIL_PORT

 

7. Must issue a STARTTLS command first

Error encountered when Sending mail: 5.7.0 Must issue a STARTTLS command first. sm8sm20393998pbc.92 - gsmtp Check setting of SEND_MAIL_ variables in /var/www/iv/engine/config/const.php.

Cause: Incorrect value for SEND_MAIL_SSL

 

8. Last request failed

Error encountered when Sending mail: Last request failed. Check setting of SEND_MAIL_ variables in /var/www/iv/engine/config/const.php.

Cause: Value for SEND_MAIL_SERVER and SEND_MAIL_PORT are valid but email server at that location is not able to process request

 

9. Connection timed out

Error encountered when Sending mail: Connection timed out Check setting of SEND_MAIL_ variables in /var/www/iv/engine/config/const.php.

Cause: Incorrect value for SEND_MAIL_SERVER, SEND_MAIL_PORT.

At machine confirm that you have connectivity to the email server. For example, use telnet to test

[root@MetricInsights-Centos-64-bit ~]# telnet smtp.gmail.com 587
Trying 173.194.79.109...
Connected to smtp.gmail.com.
Escape character is '^]'.
220 mx.google.com ESMTP lr3sm64684873pab.4 - gsmtp

Upon successful telnet connection, then exit via "control ]" keys followed by "quit"

^]
telnet> quit
Connection closed.
[root@MetricInsights-Centos-64-bit ~]# 

 

10. Unrecognized command

Error encountered when Sending mail: 5.3.3 Unrecognized command. Check setting of SEND_MAIL_ variables in /var/www/iv/engine/config/const.php.

Cause: Value for SEND_MAIL_SSL should be empty ('')

 

11. No specific error information supplied.

Error encountered when Sending mail. Check setting of SEND_MAIL_ variables in /var/www/iv/engine/config/const.php.

Many possible reasons can cause this message. For example, certain values for the SEND_MAIL_ parameters are not completed, such as SEND_MAIL_SERVER, SEND_MAIL_LOGIN

2. If no errors are shown on the Status Monitor, try these steps:

2.1. Test sending an email

Try sending an email. There are various places in the Metric Insights application where you can send an email. Below are just a few examples.

  1. Requesting a 'Daily' Favorites Digest
  2. The Share Function

2.2. Test sending emails to various accounts

If users within an organization are not getting emails then try sending emails to accounts outside the organization. For example, try sending to your personal email account.

2.3. Check whitelist

If you find that some accounts do not receive emails but others do, then ask your email administrator to verify that the Metric Insights is on the whitelist for receiving email.

2.4. Check spam folder

If you find that some accounts do not receive emails but others do, then check their spam folder. Emails could have been blocked as spam by your system.

3. Check email log files

Check email log files

If you have access to Metric Insights application server then you can check the system logs for any errors.

  1. View the contents of /var/mail/root. This file contains information on emails with which the system had trouble.
  2. View the contents of log files in all email digest activity for troubleshooting. The log file is saved to: /var/www/iv/data/temp/email/YYYY-MM-DD.log to see when email was sent. You will need to have set EMAIL_LOGGING to 'Y' in the Setting the Configuration Variables

4. Troubleshoot mail server via telnet

You can use telnet to do some basic querying of the mail server. Depending on the mail server, the commands and order of the commands will differ. What follows is just a few of the first simple SMTP commands via telnet

me@myserver:~$ telnet exchange2010.server.com 25
Trying 192.168.1.4...
Connected to exchange2010.server.com.
Escape character is '^]'.
220 EXCHANGE2010.server.com Microsoft ESMTP MAIL Service ready at Sun, 18 May 2014 23:36:01 -0400
ehlo
250-EXCHANGE2010.server.com Hello
250-SIZE
250-PIPELINING
250-DSN
250-ENHANCEDSTATUSCODES
250-STARTTLS
250-X-ANONYMOUSTLS
250-AUTH LOGIN
250-X-EXPS GSSAPI NTLM
250-8BITMIME
250-BINARYMIME
250-CHUNKING
250-XEXCH50
250-XRDST
250 XSHADOW
AUTH LOGIN