SMTP setup for CloudShare Sharepoint Foundation 2010 SP1 W/ Dev Tools Environment

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.

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 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:

Start Server Manager

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 – 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: (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

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.

4 thoughts on “SMTP setup for CloudShare Sharepoint Foundation 2010 SP1 W/ Dev Tools Environment

    1. Dedra Post author

      Hi Aladdin, glad it helped! I read the same recommendation but I never could get it to work without anonymous access. I talked to a couple of SharePoint server admins who allow anonymous but only grant connections and relays from the SharePoint server. According to the admins, this effectively stops any external machine from relaying through your SMTP.

  1. Sai Gutta

    Hi Dedra,

    is there anyway i can test it outside sharepoint before using it in sharepoint like a powershell script, i used the below script

    $smtpServer = “sp2010.SPSTD.LOC”
    $msg = new-object Net.Mail.MailMessage
    $smtp = new-object Net.Mail.SmtpClient($smtpServer)
    $msg.From = “”
    $msg.Subject = “Nightly Log File”
    $msg.Body = “The nightly log file is attached”
    It went throught but didn’t send any kind of message. is it gmail blocking it as spam ?

    1. Dedra Post author

      Hi Sai,

      I’ve yet to write a script or app to test it outside of SP but I’ll give it a try and post my results. In the meantime, have you tried sending a notification through SharePoint while monitoring the SMTP mail queue folder? It’s usually at C:\inetpub\mailroot\Queue. Any email notifications from SharePoint that have yet to be sent will be queued up in this folder. Or routed to the Badmail folder in the same location.


Comments are closed.