Hi Mike,

 

Thank you very much for this code-snippet . You've confirmed what I'd
managed to deduce from various sources yesterday, following John Hodgson's
suggestion below. What I found a bit difficult was that literally all of the
Event Receiver examples I could find concentrated on Site Collection, Site,
List and Item related events, whereas this Email received event a) had no
examples I could find, and b) has an event signature unlike any of the other
events.

 

I'd managed to get similar code to what you've provided below installed and
nearly working, but your example makes clear to me what are probably the
minimal columns / attributes you need to set when creating the item, which
was where my code was failing.

 

My observation at this point in time is that I'm just not sure the paradigm
for developing what we want t do as a SharePoint Event Handler is "worth
it".

 

The process for every build is as follows:

 

.         Build the Class Library that overrides the event to receive, and
ensure the class library is strong named.

.         Remove any earlier version of the class library from the GAC.

.         Install the new version of the class library from GAC.

.         Build a console application to register the new version of the
event receiver against the appropriate SharePoint list / document library.

.         Send an e-mail to the associated Document Library to test it.

.         Examine the Event Viewer to see any SharePoint Services error, or

.         Examine the Document Library to see the newly created item .

 

To be fair, I don't have complete exception handling in place in this proof
of concept code, but the only place I find evidence of the success or
failure of the event handler is in the Event Log, or that the item I was
intending to create is actually created.

 

And so far I haven't been able to do meaningful debugging on the event
receiver. I can't seem to set break points within the event receiver, or
attach to the appropriate process to do so. But that may be my lack of
knowledge.

 

Can anyone clarify Is there any alternative to having to install these in
the GAC to get them registered, and is that affecting my ability to debug
the event receiver?

 

For what it's worth, at this point in time, my strong inclination is to not
do the processing we need to do within SharePoint, but instead to write a
Windows Service, a development paradigm I'm much more comfortable with, and
have it be the initial recipient, and parser of inbound e-mails and then
create the appropriate SharePoint list / document library items and attach
the documents were need such as the original e-mail and image attachment
manually.

 

Kind Regards,

Trevor Andrew

 

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
MacDonald, Mike
Sent: Thursday, 3 April 2008 2:09 AM
To: [email protected]
Subject: RE: [OzMOSS] Mail Enabling a SharePoint List

 

Trevor:

 

I as well was trying to do that and consulted with our Microsoft reps who
claimed it was not possible, or would require to much custom coding (which I
do not have the knowhow for).  HOWEVER, I did try to research it and found
the code for the existing email event handlers.If it helps you at all, I
have included it below.

 

using System;

using System.Collections.Generic;

using System.Text;

using Microsoft.SharePoint;

 

namespace TaskHandler

{

    public class SimpleHandler:SPEmailEventReceiver

    {

        public override void EmailReceived(SPList list,
Microsoft.SharePoint.Utilities.SPEmailMessage emailMessage, string
receiverData)

        {

            SPListItem item = list.Items.Add();

            item["Title"] = emailMessage.Headers["Subject"];

            item["DueDate"] =
System.DateTime.Parse(emailMessage.Headers["Date"]).AddDays(21);

            item["Description"] = emailMessage.HtmlBody;

            item.Update();

        }

    }

}

 

If you are successful in creating this application, I would love to see it!
It would be very useful for me!

 

Thank you,

 

Mike 

Securian Financial Group

 

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Brian Meinertz
Sent: Tuesday, April 01, 2008 10:01 PM
To: [email protected]
Subject: RE: [OzMOSS] Mail Enabling a SharePoint List

 

Trevor

 

I believe there is a product available from Macroview
<http://www.macroview.com.au/WisdomMessage.htm>  called WISDOM Message,
which supports drag-drop and metadata capture from Outlook.

 

Haven't used this tool myself, but it may be also worth investigating.

 

Cheers

Brian
Vivid Group

 

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Trevor Andrew
Sent: Wednesday, 2 April 2008 7:28 AM
To: [email protected]
Subject: RE: [OzMOSS] Mail Enabling a SharePoint List

 

Hi John,

 

No we hadn't considered that option . I'll go and do some research on that
approach.

 

Thanks,

Trevor

 

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Hodgson, John
Sent: Wednesday, 2 April 2008 10:19 AM
To: [email protected]
Subject: RE: [OzMOSS] Mail Enabling a SharePoint List

 

BTW you can write custom email handlers for SharePoint.is that being
considered?

 

JohnH(HP)

 

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Trevor Andrew
Sent: Wednesday, April 02, 2008 9:50 AM
To: [email protected]
Subject: RE: [OzMOSS] Mail Enabling a SharePoint List

 

Hi Ishai,

 

Thanks for that. I guess also because of your suspicion (which I'll try and
verify), that the event handlers don't fire on inbound e-mail, the third
option is likely to not be a very good useful either .

 

With regard to processing outside of SharePoint, I was going to write a
relatively simple Windows Service that monitors a mailbox, rather than a
solution embedded within Exchange Server infrastructure itself . I've more
expertise with writing Windows Services than with working within Exchange
events etc .

 

Cheers,

Trevor

 

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Ishai Sagi
Sent: Wednesday, 2 April 2008 9:37 AM
To: [email protected]
Subject: RE: [OzMOSS] Mail Enabling a SharePoint List

 

I'd be weary of the first one, as I had heard (not experimented though - so
you'd better test it yourself and not take my word) that event handlers do
not get triggered by the incoming email.

As for the second option, if you have exchange server and experience in
developing for it you can do that on the server, or otherwise you will have
to code against the smtp service.

 

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Trevor Andrew
Sent: Wednesday, 2 April 2008 9:13 AM
To: [email protected]
Cc: Ishai Sagi
Subject: [OzMOSS] Mail Enabling a SharePoint List

 

Hi All,

 

We are designing a SharePoint application and we intended to use an e-mail
enabled list as the recipient of initial requests. While doing some initial
prototypes I've found that it appears the only SharePoint list types that
can be e-mail enabled are:

 

.         Document Library

.         Announcements List

.         Calendar List

.         Discussion Board

 

In our initial prototyping we used a Document Library, and experimented with
the various settings (i.e. save original e-mail, create folder for
documents, store in root folder etc). None of the setting combinations seem
to deliver just what we want. The e-mails we receive consist of a plain text
body with an image attachment, both of which we would like saved, and the
attributes of the item need to be populated from values parsed out of the
e-mail.  The outcome we would like to achieve is that inbound e-mail ends up
as:

 

.         A list item with attributes filled in with values parsed from the
text body of the e-mail.

.         The item should have two attachments, the original plain text body
of the e-mail and the picture attachment from the e-mail

 

I guess my question is how would you recommend we approach this.
Alternatives I can see are potentially viable:

 

.         Write an event receiver to perform the appropriate parsing /
conversion

.         Parse the e-mails outside of SharePoint, and programmatically
create the items in a custom list with the appropriate attachments

.         Develop a custom list - sounds complex and I'm not even sure how
much more simply it would allow us to do what we want

 

I'd really welcome some advice on the best recommended approach to this .

 

Cheers,

 

Trevor Andre

-------------------------------------------------------------------
OzMOSS.com - to unsubscribe from this list, send a message back to the list
with 'unsubscribe' as the subject.
Powered by mailenable.com 

-------------------------------------------------------------------
OzMOSS.com - to unsubscribe from this list, send a message back to the list
with 'unsubscribe' as the subject.
Powered by mailenable.com 

-------------------------------------------------------------------
OzMOSS.com - to unsubscribe from this list, send a message back to the list
with 'unsubscribe' as the subject.
Powered by mailenable.com 

-------------------------------------------------------------------
OzMOSS.com - to unsubscribe from this list, send a message back to the list
with 'unsubscribe' as the subject.
Powered by mailenable.com 

-------------------------------------------------------------------
OzMOSS.com - to unsubscribe from this list, send a message back to the list
with 'unsubscribe' as the subject.
Powered by mailenable.com 

-------------------------------------------------------------------
OzMOSS.com - to unsubscribe from this list, send a message back to the list
with 'unsubscribe' as the subject.
Powered by mailenable.com 

-------------------------------------------------------------------
OzMOSS.com - to unsubscribe from this list, send a message back to the list
with 'unsubscribe' as the subject.
Powered by mailenable.com 




------------------------------------------------------------------- OzMOSS.com 
- to unsubscribe from this list, send a message back to the list with 
'unsubscribe' as the subject.
Powered by mailenable.com

Reply via email to