[description], Story, any other text you want to use.
Microsoft CRM Customization: MS Exchange Transport SMTP Event Sink
by: Boris Makushkin
Microsoft CRM has variety of customizations options and tools. The official and the most popular is Microsoft CRM SDK: collection of C#.Net and partially VB.Net classes, methods and code samples. Here we would like to give you more complex case, when you call CRM SDK customization from custom MS Exchange event handler – we are improving the functionality of MS Exchange – MS CRM connector.
Imagine the case when you want outgoing email to be captured and placed into CRM, attached to Contact, Account or Lead they should belong to. If this is realized – your salespeople can use any email tool to send their messages, they do not have to do it in CRM or Outlook Client for CRM.
MS Exchange OnSyncSave database event can't work with Sent folder – it doesn't fire when message goes to Sent folder. The reason is described here:
PRB: Store Events Do Not Fire on the Outbox or Sent Item Folders
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q297274
Please, see SMTP Event Sink example in this article: http://support.microsoft.com/default.aspx?scid=kb;en-us;317327. Event handler works OnArrival event:
void ISMTPOnArrival.OnArrival(CDO.IMessage msg, ref CDO.CdoEventStatus EventStatus)
{
log = LogManager.GetLogger(typeof(ShieldsUp));
DOMConfigurator.Configure(new FileInfo(Environment.SystemDirectory + "/CustomerApp/log.config"));
try {
ProcessMessage(msg);
}
catch (Exception ex) {
log.Debug(ex.Message + "\n" + ex.StackTrace);
}
finally {
LogManager.Shutdown();
}
}
The class:
// ComVisible enables COM visibility of this class. The default is true.
// Explicitly setting this attribute to true, as shown below, is useful
// if ComVisible is set to false for the namespace and you want the
// classes to be accessible individually.
[ComVisible(true)]
public class ShieldsUp: CDO.ISMTPOnArrival
{
Next the handling works similar to SyncSave handler:
private void ProcessMessage(CDO.IMessage msg)
{
string sFrom;
string sTo;
string sSubject;
string sBody;
string sSensitivity;
try
{
log.Debug("Firing Up ProcessMessage()");
sSubject = msg.Subject;
sBody = msg.TextBody;
sFrom = msg.From;
sTo = msg.To;
if (msg.Fields["urn:schemas:mailheader:sensitivity"].Value != null)
sSensitivity = msg.Fields["urn:schemas:mailheader:sensitivity"].Value.ToString();
else
sSensitivity = "Normal";
log.Debug("Message From: " + sFrom);
log.Debug("Message To: " + sTo);
log.Debug("Subject: " + sSubject);
log.Debug("Sensitivity: " + sSensitivity);
log.Debug("Body: " + sBody);
In deployment you should consider the following – the handler will work only in the case of SMTP protocol delivery. If you use Outlook or Outlook Web Access, then delivery uses MAPI and OnArrival doesn't fire. Please see this article: http://support.microsoft.com/default.aspx?scid=kb;en-us;273233
The elegant fix is two SMTP gateways, find it here http://support.microsoft.com/default.aspx?scid=kb;en-us;Q288756
About The Author
Boris Makushkin is Lead Developer in Alba Spectrum Technologies – USA nationwide Great Plains, Microsoft CRM customization company, based in Chicago, California, Colorado, Arizona, New York, Texas, Florida, Georgia and having locations in multiple states and internationally (www.albaspectrum.com), he is Microsoft CRM SDK, Transact SQL, C#.Net, Crystal Reports and VB.Net developer. Boris can be reached: 1-866-528-0577, borism@albaspectrum.com.
|
coaxial cable
Real Time Media On The Net
This is one of the best resources for information on Real Time Media On The Net you can possibly find.
Follow our links to find more information on Real Time Media On The Net.
We hope that we have all of the Real Time Media On The Net details that you could need.
Real Time Media On The Net
|
coaxial cable - a high stand of information
When you’re seeking information about coaxial cable the results can seem extremely overwhelming. But relax, because we’ve sifted through all the coaxial cable web sites we could find and have discovered the finest ones that will produce the results you want, and how you want them.
We know how crucial good results are when you’re searching for coaxial cable. Some Internet sites are superior than others and will meet your coaxial cable requirements in a better fashion.
If you’re looking for a high standard coaxial cable site you know you can count on, we suggest the above web site. We have taken the tiresome task out of your coaxial cable shopping and reduced our list of coaxial cable web sites down to only finest around.
Being assured you’re receiving value for money is crucial in buying coaxial cable, so by visiting our web site you can expect the assurance that you are getting the coaxial cable you paid for.
By purchasing through our suggested links you can also rest assured your coaxial cable will be of a high standard. How do we know? Because when we’re shopping for coaxial cable ourselves it’s where we go.
You might be pondering why we’re suggesting you visit outside links rather than stay on our own coaxial cable site. Well it’s because we’ve only recently created our site so it's early days. Our goal is to be the best site for coaxial cable info on the net, and real soon we’ll achieve it. So please bookmark us and come back soon.
Real Time Media On The Net Index
|