Of all the client projects I’ve been on not once was I able to setup outgoing e-mail with SharePoint without having to do some troubleshooting. I’d like to pass along some basic troubleshooting steps that have helped me diagnose the errors I’ve received.
To configure outgoing E-mail in SharePoint you have 2 options, use Central Admin or STSADM.
The basic info is outgoing SMTP address, from address and reply-to address.
The other way is STSADM –o email
As you can see, the setup is pretty simple, here is where the fun begins. Once you set the SMTP server, SharePoint basically will accept any value you give it whether it can talk to it or not. Easiest way to test if its working from SharePoint is to add a user to a site and try and send them a welcome email. If it doesn’t work it will throw you an error telling you that it can’t send the email.
Troubleshooting Tip #1
Talk to your networking/mail team and get the SMTP server address and port
Troubleshooting Tip #2
What I first do is goto the index server and open a command prompt and use the basic old school dos command “telnet”.
telnet smtp.server.com 25
(Typically SMTP operates over port 25, but your company may be different.)
What will happen with this command is one of two things:
If it opens up and basically looks like a blank screen, that means that the SharePoint server can talk to the SMTP server fine.
If it tells you something along the lines of “connect failed”, you know that your SharePoint server can’t talk to the SMTP server. What you should then do is talk to your networking team and make sure that your SMTP server allows connections from your SharePoint server. Once that is done, retest your telnet command.
Troubleshooting Tip #3
If your networking team says that you have the server correct, port correct and that there is no reason your server can’t connect to the SMTP, then check your SharePoint server and see if its running any antivirus. The past few clients have been running McAFee antivirus. In its Access Prevention Task, "Prevent mass mailing worms from sending mail" has been enabled and that was blocking the server from connecting to the SMTP server over port 25. As soon as I disabled that I was able to telnet in without issues and then I was able to send email from SharePoint without issue.
I am not sure about the other antivirus vendors but I am sure they have something similar, so check the settings to see if they block port 25.
Troubleshooting Tip #4
Check to make sure that Windows Firewall is not blocking port 25, if it is, make sure that you add 25 as an exception.
Troubleshooting Tip #5
If the tips above don’t help, check out this link by John Powell. He provides a small c# console app that attempts to create a mail message and send it through the SMTP server. Build the app and put it on the SharePoint app server and run it. Running the app will either send the e-mail or not, and if not, it will provide you with a MUCH better error message than SharePoint gives you. Take that info and then start tracking it down to see what might be going on.
Hopefully one of these tips above will help you solve your outgoing e-mail problems. If they don’t, feel free to ping me and I will work with you to solve the issue.