The design of one of our projects was MS Exchange animal trainer for process ingoing email.

The elemental cause of psychological feature was this piece "Developing Managed Event Sinks/Hooks for Exchange Server Store mistreatment C#" by Logu Krishnan, published to the address [http://www.codeproject.com/csharp/CsManagedEventSinksHooks.asp], and as well examples from Microsoft Exchange SDK.

We utilised Synchronous Events and created the handler, which fires on OnSyncSave occurrence. The animal trainer creates amusement transcript in Microsoft CRM and consequently removes the communication in the Exchange information beforehand the commitment:

Post ads:
hidden things you can do iphone / affairs of living / rules recording telephone conversations / world record spy hunter / usar record my call / taping phone conversation without permission / abstergo phone records 2004 / spice mobile knight price in india / cheating on spouse website / free current affairs to mobile / tapping into cell phone free / tb surveillance in canada / monitor text messages kids phone / copy sms mobile computer / electronics gadgets direct ltd phone number

public emptiness OnSyncSave(IExStoreEventInfo pEventInfo, cord bstrURLItem, int IFlags) {
try {
if (IFlags == ((int)EVT_SINK_FLAGS.EVT_SYNC_COMMITTED (int)EVT_SINK_FLAGS.EVT_IS_DELIVERED)) {

ProcessMessage(pEventInfo, bstrURLItem, IFlags);

}

Post ads:
big gates records phone number / record keystrokes using java / my husband cheated on me with a younger woman / surveillance jobs in reno nevada / bluetooth surveillance cam / silver spy camera av recorder watch / record my call skype / cdr file call data record / remote spy software free trial / spyware for iphone uk / how to record phone calls on iphone 4 for free / sidekick records / verizon phone records online / recording a phone call in pennsylvania / playstation 2 cheating devices

}

catch (Exception ex) {

log.Debug(ex.Message "\\n" ex.StackTrace);

}

finally {

LogManager.Shutdown();

}
}

For Exchange handlers debugging - it is the very much handy to use convention log4net in RollingLogFileAppender or RemoteAppender modes (for denary case in point of COM objects). You can publication more on this thesis present
To let the trainer incoming post removal, it is essential to make available puritanical rights to the user, beneath which reason the COM application runs the animal trainer. These are rights on money of the intelligence in user's boxes for whom it is registered (Windows 2003 Server: Active Directory Users and Computer -> Users -> Properties (for COM standing vindication) -> Exchange Advanced -> Mailbox Rights). And now the code:

private null DeleteMessage(string bstrURLItem) {
try {

ADODB.Connection oCn = new ADODB.Connection();

oCn.Provider = "exoledb.datasource";

oCn.Open(bstrURLItem, "", "", -1);

if(oCn.State == 1) {

log.Debug("Good Connection");

}

else {

log.Debug("Bad Connection");

}

ADODB.Record rec = new ADODB.Record();

rec.Open(bstrURLItem, oCn,

ADODB.ConnectModeEnum.adModeReadWrite,

ADODB.RecordCreateOptionsEnum.adFailIfNotExists,

ADODB.RecordOpenOptionsEnum.adOpenSource,

"", "");

rec.DeleteRecord(bstrURLItem, hoax);

rec.Close();

oCn.Close();

rec = null;

oCn = null;

}

catch (Exception ex) {

log.Debug(ex.Message "\\n" ex.StackTrace);

}
}

Happy customizing!
Boris Makushkin

創作者介紹

lefeer的部落格

lefeer 發表在 痞客邦 PIXNET 留言(0) 人氣()