Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

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 test@yahoo.com,
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.

Comment on Scripts that should use outlook.exe to send mails
Download Code
Re: Scripts that should use outlook.exe to send mails
by marto (Chancellor) 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 http://search.cpan.org 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?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://866304]
Approved by marto
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (8)
As of 2014-10-25 17:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (146 votes), past polls