I have a massive problem that I need to solve. I have a document library that is a catch all dumping ground for emails that are forwarded there by our users out in the field. With in these emails are signatures that will have the original persons email address in, the domain in that address has a discussion board related to it.
So for example Gmail.com has one where I want to put all the address with that domain into one discussion board.
So far I have the following code:
using System;
using System.Security.Permissions;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Security;
using Microsoft.SharePoint.Utilities;
using Microsoft.SharePoint.Workflow;
namespace EventReceiverProject1.EventReceiver1
{
/// <summary>
/// List Email Events
/// </summary>
public class EventReceiver1 : SPEmailEventReceiver
{
/// <summary>
/// The list received an e-mail message.
/// </summary>
public override void EmailReceived(SPList list, SPEmailMessage emailMessage, String receiverData)
{
SPListItem oListItem = list.Items.Add();
oListItem["Title"] = emailMessage.Headers["Subject"];
oListItem["Body"] = emailMessage.HtmlBody;
oListItem.Update();
}
}
}
But I'm not sure how I define it and where to put it based on the domain. Here is an example list:
DOMAIN gmail.com, hotmail.com
DISCUSSION BOARD Gmail customers, Hotmail Customers
Any help on this would be a massive help!
Reagards