As a developer, server administration is definitely not my area of expertise. Nonetheless, this post details how I set up SMTP and configured SharePoint’s out going emails on a CloudShare Sharepoint Foundation 2010 SP1 (Windows Server 2008 R2) with Developer Tools VM environment.
First, if you don’t already have one, get a gmail account. Then, start Server Manager.
Select Features, then SMTP Server and click Add Required Role Services.
This takes you back to the Add Features Wizard with SMTP Server checked. Click Next.
Click Next again.
Make sure all the IIS Management Tools are installed or checked to be installed. Then click Next followed by Install and Close.
Now open IIS 6.0 Manager. (Use IIS 6 Manager even though 7 is also installed.)
Right click the SMTP Virtual Server and select Properties.
Enable logging on the General tab.
Go to the Access tab and Authentication. Check all the options.
Go to the Delivery tab and select Outbound Security.
Check Basic Authentications, TLS and enter your gmail account credentials.
Click Okay and then select Outbound Connections. Change the TCP port to 587 for gmail.
Say Okay and click the Advanced button. Enter your CloudShare environment’s domain (computer) name and smtp.gmail.com as the Smart host.
Go back to the Access tab and select Connections. Click Only the List Below and Add.
Check Single Computer, click DNS Lookup, enter the environment’s domain name and click Okay.
The IP address will be populated. Click Okay twice.
Now, do the same thing for Relay on the Access tab. It is very important to restrict the computers that can relay! Be sure “Allow all computers…” is NOT checked and click Okay.
Next, check the security tab. I did not have to make any changes from those already specified:
Click Okay to close the properties box and then close the IIS 6.0 Manager.
Now, Open Services.
Right click on Simple Mail Transfer Protocol and select Properties.
Make the Start Up Type Automatic and click Okay. Close Services.
Now, go to Central Admin and System Settings.
Then Configure Outgoing Email Setting.
Enter your server name, gmail account and click Okay.
Finally, send yourself an alert (or other email) from your SharePoint site. You will receive an email from Google similar to this:
Someone recently tried to use an application to sign in to your Google Account – firstname.lastname@example.org. We prevented the sign-in attempt in case this was a hijacker trying to access your account. Please review the details of the sign-in attempt:
Thursday, January 17, 2013 6:38:11 PM UTC IP Address: 126.96.36.199 (computername)
Location: Somewhere, USA
If you do not recognize this sign-in attempt, someone else might be trying to access your account. You should sign in to your account and reset your password immediately.
If this was you, and you want to give this application access to your account, complete the troubleshooting steps listed at http://support.google.com/mail?p=client_login
Note: This email address cannot accept replies.
The Google Accounts Team
Just follow the instructions in the troubleshooting link and send another email from your SharePoint site. Gmail should relay the email and you’ll receive the task or alert in the inbox specified for the SharePoint user.