Cannot use SharePoint to send an email to a list or library

MOSS 2007 allows for the ability to send emails (incoming email) to Document Libraries and Discussion lists etc., so that content is automatically populated in these lists and libraries.

Sharepoint also allows the ability to send out emails (outgoing email) for things such as Content Deployment jobs.

We put 2 & 2 together and thought - “Why don’t we setup a list called ‘Alerts’ that will receive daily emails from our Content Deployment job? That way whoever wants to receive these can setup an ‘Alert’ on the Alerts list”. It was an excellent idea except for the fact that it DIDN’T work!

After a bit of snooping around it turns out that Sharepoint doesn’t like receiving email from itself! Here is the email that was dropped into the SMTP drop folder and was picked up by the timer service-

   1: x-sender: ALERTS@computer.domain
   2: x-receiver: ALERTS@computer.domain
   3: Received: from computer ([127.0.0.1]) by computer.domain with Microsoft SMTPSVC(6.0.3790.1830);
   4:      Wed, 22 Aug 2007 17:50:37 -0400
   5: Date: 22 Aug 2007 17:50:37 -0400
   6: From: <ALERTS@computer.domain>
   7: To: <ALERTS@computer.domain>
   8: Content-Transfer-Encoding: 8bit
   9: Content-Type: text/html; charset=utf-8
  10: Subject: JOB FAILED: Content deployment job ‘INCREMENTAL deploy’ started at 8/22/2007 5:50:31 PM
  11: MIME-Version: 1.0
  12: X-Mailer: Windows SharePoint Services (version 3)
  13: Return-Path: ALERTS@computer.domain
  14: Message-ID: <computerXvpFVjCR00000005@computer.domain>
  15: X-OriginalArrivalTime: 22 Aug 2007 21:50:37.0488 (UTC) FILETIME=[79882B00:01C7E506]
  16:  
  17: The content deployment job ‘INCREMENTAL deploy’ on path ‘Dev to Production’ failed. A detailed report is available at: <a href=”http://computer:8000/_admin/DeploymentReport.aspx?ReportId=77b99034-ba11-4072-9983-ba1ee4dc8483″ >http://computer:8000/_admin/DeploymentReport.aspx?ReportId=77b99034-ba11-4072-9983-ba1ee4dc8483</a>

Notice on Line 12 that the X-Mailer is “Windows SharePoint Services (version 3)”. This email was REJECTED after being picked up

So I replaced the X-Mailer header with Outlook Express’s X-Mailer header-

   1: x-sender: ALERTS@computer.domain
   2: x-receiver: ALERTS@computer.domain
   3: Received: from computer ([127.0.0.1]) by computer.domain with Microsoft SMTPSVC(6.0.3790.1830);
   4:      Wed, 22 Aug 2007 17:50:37 -0400
   5: Date: 22 Aug 2007 17:50:37 -0400
   6: From: <ALERTS@computer.domain>
   7: To: <ALERTS@computer.domain>
   8: Content-Transfer-Encoding: 8bit
   9: Content-Type: text/html; charset=utf-8
  10: Subject: JOB FAILED: Content deployment job ‘INCREMENTAL deploy’ started at 8/22/2007 5:50:31 PM
  11: MIME-Version: 1.0
  12: X-Mailer: Microsoft Outlook Express 6.00.3790.2929
  13: Return-Path: ALERTS@computer.domain
  14: Message-ID: <computerXvpFVjCR00000005@computer.domain>
  15: X-OriginalArrivalTime: 22 Aug 2007 21:50:37.0488 (UTC) FILETIME=[79882B00:01C7E506]
  16:  
  17: The content deployment job ‘INCREMENTAL deploy’ on path ‘Dev to Production’ failed. A detailed report is available at: <a href=”http://computer:8000/_admin/DeploymentReport.aspx?ReportId=77b99034-ba11-4072-9983-ba1ee4dc8483″ >http://computer:8000/_admin/DeploymentReport.aspx?ReportId=77b99034-ba11-4072-9983-ba1ee4dc8483</a>

And Lo and Behold, this email was picked up and processed and it showed up in my Alerts list!

I’m not sure if this is a bug or not because one can imagine a scenario where an alert for a list goes out to the same email address as the incoming email address for the list. The developers were probably trying to prevent an infinite loop in such a scenario. However, that means that even for all legit purposes, you CANNOT HAVE SHAREPOINT EMAIL ITSELF.

Comments are closed.