|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
hi
I am trying to write a perl script that will invoke MS Outlook on a windows machine using win32: le , i want a simple script all i want it to do is send a message via outlook , the rest i can modify later (dont ask me why i need to do this, i know ther are easier ways but alas)the code i have so far ------------------------------------------------------ #!/usr/local/perl/bin use strict; use Win32::OLE; use Win32::OLE::Const 'Microsoft Outlook'; my $Outlook = Win32::OLE->new('Outlook.Application', 'Quit'); my $ol = Win32::OLE::Const->Load($Outlook); my $namespace = $Outlook->GetNamespace("MAPI"); $namespace.Logon "", ""; $Object->{Property} = $Outlook(CreateItem); $Object ->Recipients->Add("me@me.com"); $Object->Send; ------------------------------------------------- it doesnt work at all here is some vb code i foudn if anyone knows how to convert this into perl Dim theApp, theNameSpace, theMailItem Set theApp = ASP.CreateObject("Outlook.Application") Set theNameSpace = theApp.GetNameSpace("MAPI") theNameSpace.Logon "profile", "password" Set theMailItem = theApp.CreateItem(0) theMailItem.Recipients.Add "user@somewhere.com" theMailItem.Subject = "Your Subject Here" theMailItem.Body = "Your message here." theMailItem.Send theNameSpace.Logoff ------------------------------------------------ Thanks in advance |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Perl Programming > I need help qucik |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|