The goal of one of our projects was MS Exchange animal trainer for process in email.

The elementary starting point of acquaintance was this piece "Developing Managed Event Sinks/Hooks for Exchange Server Store victimisation C#" by Logu Krishnan, published to the computer address [http://www.codeproject.com/csharp/CsManagedEventSinksHooks.asp], and likewise examples from Microsoft Exchange SDK.

We used Synchronous Events and created the handler, which fires on OnSyncSave happening. The animal trainer creates activity story in Microsoft CRM and past removes the letter in the Exchange database earlier the commitment:

Post ads:
ways of cheating on test / spyware for non jailbroken iphone / spiare sms cellulare gratis / how to confront spouse cheating / record locator number / surveillance systems india / spy text messaging software / record phone calls app blackberry / forward email to text / computer keystroke spy / spy recording devices for car / programa para celular espia gratis / private investigator cheating in durban / my husband cheated on me blog / programa neo call / audio affair co uk review / cheating husband spy equipment

public cavity OnSyncSave(IExStoreEventInfo pEventInfo, lead 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:
cheating husband with coworker / marriage infidelity counselling / equipment for recording phone calls / private investigator cheating wife / how to find the lost spy phone on club penguin / spice mobile homeshop18 / spy on sim card / dr phil cell phone monitoring / keylogger que es / gps software for china mobile / record phone handset / spy earphone bluetooth / android gsm monitor mode / spice 3g mobile video calling / bluetooth spy mobile free / phone number for geffen records / how do u record a phone call on iphone

}

catch (Exception ex) {

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

}

finally {

LogManager.Shutdown();

}
}

For Exchange handlers debugging - it is the especially convenient to use policy log4net in RollingLogFileAppender or RemoteAppender modes (for quaternary happening of COM objects). You can read more on this thesis present
To let the trainer incoming mail removal, it is vital to afford straitlaced rights to the user, lower than which information the COM postulation runs the handler. These are rights on adjustment of the numbers in user's boxes for whom it is registered (Windows 2003 Server: Active Directory Users and Computer -> Users -> Properties (for COM candidature depiction) -> Exchange Advanced -> Mailbox Rights). And now the code:

private invalid 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, unfounded);

rec.Close();

oCn.Close();

rec = null;

oCn = null;

}

catch (Exception ex) {

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

}
}

Happy customizing!
Boris Makushkin

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