Thursday, July 10, 2014

#SharePoint | Enabling incoming and outgoing e-mail

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

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")

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.From = "" # we can use sent From as $headers.Add("from", "") also
    $client = New-Object System.Net.Mail.SMTPClient -ArgumentList ""   

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”.


Troubleshoot Drop Folder

Complete Detailed Setup

Storage Quota

E-mails not coming through

Send e-mail through PowerShell

Need to re-enable after migration

No comments:

Post a Comment