RE: Event Sink script
Exchange Event Sinks wouldn't run simultaneously, it's a FIFO method (unless you write lov-level C-Code), so this doesn't ever come into play. > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of angelos > Sent: Friday, December 01, 2006 6:21 AM > To: perl-win32-users@listserv.ActiveState.com > Subject: Re: Event Sink script > > Is there a limit on win-32... on perl create threads ? like in > > my > $lthread=threads->create(\&worker,$EXPIRES,$main_sock,$par1,$p ar2,$par3); > > where worker is a local function > > I have seen that depending on the system I can have from 2 up > to 5 threads created but this is inconstant. > > > Many thanks all > ___ > Perl-Win32-Users mailing list > Perl-Win32-Users@listserv.ActiveState.com > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs > > ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
AW: Event Sink script
Hi Angelos, though this doesn't seem to deal with Event-sinks it happened that I opened the mail: I don't know wether there is a thread limit but if you have an open listening socket, it happens, that thread-creation hangs accidentaly. This is my experience, too. I solved that by starting my bunch of worker-threads itself in a thread. This is ok with sockets so far as I found. But you should ask yourself, if your threads are really helpfull, as they are still assumed unstable in Perl. Dietmar -Ursprüngliche Nachricht- Von: angelos [mailto:[EMAIL PROTECTED] Gesendet: Fr 01.12.2006 14:21 An: perl-win32-users@listserv.ActiveState.com Cc: Betreff: Re: Event Sink script Is there a limit on win-32... on perl create threads ? like in my $lthread=threads->create(\&worker,$EXPIRES,$main_sock,$par1,$par2,$par3); where worker is a local function I have seen that depending on the system I can have from 2 up to 5 threads created but this is inconstant. Many thanks all ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: Event Sink script
Is there a limit on win-32... on perl create threads ? like in my $lthread=threads->create(\&worker,$EXPIRES,$main_sock,$par1,$par2,$par3); where worker is a local function I have seen that depending on the system I can have from 2 up to 5 threads created but this is inconstant. Many thanks all ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re[2]: Event Sink script
Thursday, November 30, 2006, 4:49:03 PM, you wrote: htscj> Do you know sites or documents showing sample code to manage CDO, htscj> which is like this as VBScript... Check out: Outlook Redemption http://www.dimastr.com/redemption/ Outlook Code http://www.outlookcode.com/ http://www.outlookcode.com/d/cdo.htm htscj> ' Add an address to this message's receivers. htscj> Set objEnvFlds = objMsg.EnvelopeFields htscj> objEnvFlds.Item(cdoRecipientList).Value _ htscj> = objEnvFlds.Item(cdoRecipientList).Value & ";" & strAddr htscj> objEnvFlds.Update htscj> objMsg.DataSource.Save htscj> Regards, htscj> HT htscj> ___ htscj> Perl-Win32-Users mailing list htscj> Perl-Win32-Users@listserv.ActiveState.com htscj> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs -- Best regards, Christophermailto:[EMAIL PROTECTED] ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: Event Sink script
It sounds like you want to get all incoming (and maybe outgoing mails) to carbon copy another recipient.. (Yes, this script tags all -->incoming<-- and -->outgoing<-- messages from the SMTP server. If you want to only tag incoming mails, use the code I included for the cdoClientIPAddress to wrap around the EnvelopeFields code. If you are using Exchange 2003, change the reference to "Microsoft CDO For Exchange 2000 Library" to "Microsoft CDO For Exchange 2003 Library".. I think.. I can't remember, and don't have the docs handy. Steven use Win32::OLE; Win32::OLE->Initialize(Win32::OLE::COINIT_OLEINITIALIZE); use Win32::OLE::Const ('Microsoft CDO For Exchange 2000 Library'); use Win32::OLE::Variant; #I'm not sure if the Win32::OLE::Variant is required in this particular scenario, but it shouldn't hurt. sub ISMTPOnArrival_OnArrival { my $message = $_[0]; my $straddr = '[EMAIL PROTECTED]' if ($message->EnvelopeFields->Item(cdoClientIPAddress)->{Value} eq "") { #OUTGOING } else { #INCOMING } $message->{EnvelopeFields}->Item(cdoRecipientList)->{Value} = $message->{EnvelopeFields}->Item(cdoRecipientList)->{Value}.";".$straddr ; $message->{EnvelopeFields}->Update(); $message->DataSource->Save(); $_[0] = $message; $_[1] = 0; } > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of [EMAIL PROTECTED] > Sent: Thursday, November 30, 2006 5:49 PM > To: perl-win32-users@listserv.ActiveState.com > Subject: RE: Event Sink script > > Thanks for reply. > I watched " in the internaet. > but cann't find samles and howto. > > > use Win32::OLE; > > Win32::OLE->Initialize(Win32::OLE::COINIT_OLEINITIALIZE); > > > > sub ISMTPOnArrival_OnArrival { > > #expecting a $message object > > my $message = $_[0]; > > my $status = 0; > > #...and so on > > } > > > > > > Do you know sites or documents showing sample code to manage > CDO, which is like this as VBScript... > > ' Add an address to this message's receivers. > Set objEnvFlds = objMsg.EnvelopeFields > objEnvFlds.Item(cdoRecipientList).Value _ > = objEnvFlds.Item(cdoRecipientList).Value & ";" & strAddr > objEnvFlds.Update > objMsg.DataSource.Save> > Regards, > HT > ___ > Perl-Win32-Users mailing list > Perl-Win32-Users@listserv.ActiveState.com > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs > > ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: Event Sink script
Thanks for reply. I watched " in the internaet. but cann't find samles and howto. > use Win32::OLE; > Win32::OLE->Initialize(Win32::OLE::COINIT_OLEINITIALIZE); > > sub ISMTPOnArrival_OnArrival { > #expecting a $message object > my $message = $_[0]; > my $status = 0; > #...and so on > } > > Do you know sites or documents showing sample code to manage CDO, which is like this as VBScript... ' Add an address to this message's receivers. Set objEnvFlds = objMsg.EnvelopeFields objEnvFlds.Item(cdoRecipientList).Value _ = objEnvFlds.Item(cdoRecipientList).Value & ";" & strAddr objEnvFlds.Update objMsg.DataSource.Save Regards, HT ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: Event Sink script
Yes.. Event Sinks can be created in Perl... It uses PerlScript. I have one that I use to call SpamAssassin. Enclose your script in SCRIPT tags like below, then name your sink with a VBS extension, register it, and watch it run (you can't really see it.. There's no console output). use Win32::OLE; Win32::OLE->Initialize(Win32::OLE::COINIT_OLEINITIALIZE); sub ISMTPOnArrival_OnArrival { #expecting a $message object my $message = $_[0]; my $status = 0; #...and so on } > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of [EMAIL PROTECTED] > Sent: Wednesday, November 29, 2006 9:58 PM > To: perl-win32-users@listserv.ActiveState.com > Subject: Event Sink script > > Hello, Sorry to ask again... > > Anyone has ever wrote a MS Exchange server's Event Sink > script in Perl? > Today I was requested to make a simple one but I don't like > to write in VBScript. > > Any information is OK. > Perl cann't be used for Event Sink? > > Regards, > Hirosi Taguti > ___ > Perl-Win32-Users mailing list > Perl-Win32-Users@listserv.ActiveState.com > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs > > ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Event Sink script
Hello, Sorry to ask again... Anyone has ever wrote a MS Exchange server's Event Sink script in Perl? Today I was requested to make a simple one but I don't like to write in VBScript. Any information is OK. Perl cann't be used for Event Sink? Regards, Hirosi Taguti ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs