SharePoint Troubleshooting: Alert Email Does Not Go Out

Introduction

In Practical scenario when we find SharePoint email alerts for lists not working then these steps can be executed as a part of the troubleshooting step:

Steps

1. Central Admin – Operations

Go to Central Admin —->Operations—–>outgoing email settings and verify that SMTP server is mentioned correctly

2. Test Connectivity

Test the connectivity with the SMTP server.

 

  Important
To use the telnet command you must have the options enabled in the Windows Server add-ons (Roles).

 

Telnet

In order to do that follow these steps:

  • Open cmd
  • telnet <SMTP server name> 25

    ( We connect smtp server to the port 25)

you should see a response like this 220 <servername> Microsoft ESMTP MAIL Service, Version: 6.0.3790.3959 ready at date and time

Beware that different servers will come up with different settings but you will get something

If you dont get anything then there could be 2 possible reasons, either port 25 is blocked or

the smtp server is not responding.

Test SMTP response

For testing response from your server say ehlo to it.

Type :

ehlo <servername>
output:
250 <servername> Hello [IP Address]

Test mail

Now a test mail can be sent from that SharePoint server.

Now we need to enter the From address of the mail.

Type :

mail from: xxxx@SharePoint.com

output:

250 2.1.0 xxxx@SharePoint.com….Sender OK
  •  It’s time to enter the recepient email address.
    Type : rcpt to: someID@domain.com

    output:

    250 2.1.5 someID@domain.com
  •  Now we are left with the data of the email. i.e. subject and body.Type :
    data

    output:

    354 Start mail input; end with <CRLF>.<CRLF>
  • Type:
    subject: this is a test mail

    Hi

    This is test mail body

    I am testing SMTP server.

  • Hit Enter, then . and then Enter.output:

    250 2.6.0 <<servername>C8wSA00000006@<servername>> Queued mail for delivery

  • Type:
    quit

    output:

    221 2.0.0 <servername> Service closing transmission channe

3. Check alerts

Check alerts are enabled for your web application

verify if the windows timer service is running or not.

Run this stsadm command to check that

 Stsadm.exe -o getproperty -url http://SharePoint-web-App-URL -pn alerts-enabled

This should return <Property Exist=”Yes” Value=”yes” />

If you don’t get this, Enable alerts by:

stsadm.exe -o setproperty -pn alerts-enabled -pv "true" -url http://SharePoint-web-App-URL

If its already enabled, try turn off and turn on it back.

4. Check the Timer job and Properties

Go to

MOSS 2007: Central Administration > Operations > Timer Job Definitions (under Global Configuration)

In SharePoint 2010: Central Administration > Monitoring > Review Job Definitions

Check whether the “Immediate Alerts” job is enabled for your web application. check these properties:

job-immediate-alerts

job-daily-alerts

job-weekly-alerts

stsadm.exe -o getproperty -url “http://Your-SharePoint-web-App-URL&#8221; -pn job-immediate-alerts

The expected output is:

<Property Exist="Yes" Value="every 5 minutes between 0 and 59"/>.

If you don’t get this, run the following command to set its value.

stsadm.exe -o setproperty -pn job-immediate-alerts -pv “every 5 minutes between 0 and 59″ -url http://Your-SharePoint-web-App-URL

5. Check whether the account is subscribed for alerts and it has a valid email account.

This should be the first thing to check if the problem persists for some users not for all.

6. Then check if at all those users have at least read permission for the list.

Because the first mail should go out for every user without security validation but the next ones won’t be delivered unless the user has at least read permission.

7. Isolate user

If it is happening for one user, can also try to delete and re-add the user in the site.

8. Check SQL

Most importantly, you should try this one.

Run this SQL query to the content db < Select * from Timerlock>

This will give you the name of the server which is locking the content database and since when.

In order to get rid of that lock

Go to that server which is locking the content db and then restart the windows timer service.

within some time it should release the lock from content db, if not then at the most stop the timer job for some time

Once the lock will be released then try to send some alerts

You will surely get the email alert.

I found this is the most probable reason for alert not working most of the time. We should start troubleshooting with the above steps before coming to this step for any alert email issue but from step 1 to step 7 are best for new environments or new servers.

If the issue is like this, alert was working before and suddenly stopped working without any environmental change then above conditions in step 1-7 should be ideally fine.

Even after this if it is not working, then you can try these few more steps too

9. Try re-registering the alert template:

stsadm -o updatealerttemplates -url http://Your-SharePoint-Web-App-URL -f “c:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\XML\alerttemplates.xml” -LCID 1033

10. Try to clear the configuration cache

I believe these steps altogether would definitely help everyone to resolve the alert issue exists in their environments.