SharePoint | Enabling incoming and outgoing e-mail

Problem:
On of the great features in SharePoint is the ability to integrate with Exchange, adding sending and receiving e-mail capabilities to our day-to-day developments.
Understanding how to configure and troubleshoot incoming and outgoing e-mail is crucial to take advantage of this potential.

Outgoing E-mail:
In Central Admin > System Settings > Configure outgoing e-mail settings
(/systemsettings.aspx)

By setting this up, our lists and libraries will now display a new icon in the ribbon called "Alert Me", which we can use to receive notifications based on list updates.












We can also go to [Username] > My Settings > My Alerts to set this up.
However, it will throw an exception if the outgoing e-mail configuration is not setup properly.









Incoming E-mail:
Enabling the SharePoint server to receive e-mails is far more tricky that to enable sending them.


If you are looking for the setting that allows lists to receive e-mails, you will find it in List Settings, under "Communications", but only if you setup incoming e-mail in the Central Admin.









Steps to Setup:

These have already been covered in detail on other blog posts, so I will just enumerate them:

1) Add the SMTP role to a Front-End Server

2) Install IIS 6 Management Console in the same server above

3) Enable incoming emails in CA, /systemsettings.aspx

4) Enable incoming emails for a specific list, /_layouts/EmailSettings.aspx?List=GUID

5) Send an email


Problematic areas:

E-mails send through Outlook are never received
It is possible that your main server is not aware of your working server.

1. Go to Organization Configuration > Hub Transport > Remote Domains tab

2. Create new remote domain and set domain name to smtp address of smtp server used by sharepoint

3. Go to domain properties to "Format of original message" tab and under "Message Format Options" check "allow automatic forward" (i actually have everything there checked other than "use message text line wrap at column")

Tip:
Send an email through PowerShell
#this function sends an email to someone
function send-notification($subject, $detail) {
    $message = New-Object System.Net.Mail.MailMessage
    $message.Subject = $subject
    $message.Body = $detail
    $message.To.Add("emailtest@servername.subdomain.domain.com")
    #$message.To.Add("recipient2@domain.com")
    #$message.Cc.Add("cc1@domain.com")
    #$message.Bcc.Add("bcc1@domain.com")
    $message.From = "tiago.duarte@domain.com" # we can use sent From as $headers.Add("from", "Admin@Domain.com") also
    
    $client = New-Object System.Net.Mail.SMTPClient -ArgumentList "192.168.8.100"   
    $client.Send($message)
}


E-mails go into the c:\inetpub\mailroot\Drop folder but they are stuck there
Try changing the Settings Mode to Advanced.


E-mail reception is somewhat intermittent
There are records that sometimes, just by disabling and re-enabling the incoming e-mail on a list will make problems go away.


Mr. "I've been using this for a while now"
For long running systems, it may make sense to check if you are bumping into a storage limitation problem:
Go to the SharePoint Central Administration
> Application Management
> Configure quotas and locks
> On the Site Quota Information section
> Set a limit (i.e: 5000 MB) on this setting:  “Limit site storage to a maximum of:”  > and then press “OK”.


Links:


Troubleshoot Drop Folder
http://sharepoint.stackexchange.com/questions/13253/incoming-mail-just-sits-in-the-drop-folder


Complete Detailed Setup
http://sharepointgeorge.com/2010/configuring-incoming-email-sharepoint-2010/

Storage Quota
http://blogs.msdn.com/b/george_bethanis/archive/2012/05/25/sps2010-cannot-send-incoming-emails-to-lists-libraries.aspx?CommentPosted=true#commentmessage

E-mails not coming through
http://social.technet.microsoft.com/Forums/sharepoint/en-US/0594be29-e617-4e28-a6c4-704892858e88/list-sharepoint-2007-not-receiving-email-from-outlook-to-be-sent-through-a-rule?forum=sharepointgenerallegacy

Send e-mail through PowerShell
http://sharepoint-community.net/profiles/blogs/send-mail-using-powershell

Need to re-enable after migration
http://www.shadwell.eu/paul_shadwells_weblog/2010/07/solving-incoming-email-problems-after-migrating-to-sharepoint-2010.html

Comments

Post a Comment

Popular posts from this blog

Mobile development opportunities

Breaking down document locking in SharePoint

Working around X-Frame-Options for iframes