Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Scripts that should use outlook.exe to send mails

by sagarkha (Acolyte)
on Oct 20, 2010 at 12:33 UTC ( #866304=perlquestion: print w/replies, xml ) Need Help??
sagarkha has asked for the wisdom of the Perl Monks concerning the following question:

Hello Monks, I want to write a script that should use outlook to send message. I google this and found there is command line option for outlook e.g
Outlook.exe /a C:\test.txt /c ipm.note /m,
but this opens a new window of outlook and you have to click on SEND button, but i want to send mails to multiple clients without pressing this button.

Replies are listed 'Best First'.
Re: Scripts that should use outlook.exe to send mails
by marto (Archbishop) on Oct 20, 2010 at 12:46 UTC

    Are you sure you want to automate Outlook rather than send mail via a perl script using the same account/Exchange/mail server? See MIME::Lite.

Re: Scripts that should use outlook.exe to send mails
by sundialsvc4 (Abbot) on Oct 20, 2010 at 13:12 UTC

    ... And if you do want to use “outlook.exe” directly, I believe that you will find that Outlook has a well-featured OLE interface.   You should be able to refer to “the Outlook application,” “mailboxes,” “messages,” and pretty much every other “thing” that Outlook supports, through this mechanism.   And you should encounter no problems at all using this interface with Perl.

    “I normally don’t like to think well of Microsoft Corporation,” he grumbled.   “But this, even I must admit, is A Very Good Hack.™”

    Naturally, the first thing that you should do is to search for the keyword, “Outlook.”   There we find, e.g. Mail::Outlook ...  

    Before setting forth to write anything new in Perl, always make it your business to research what might have already been done, especially in a case like this, where you know you are trodding a well-worn path.   Maybe what you find on CPAN will not be exactly what you’re looking for, but it will be close.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://866304]
Approved by marto
and God said, "Let Newton be!"...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2018-05-26 09:09 GMT
Find Nodes?
    Voting Booth?