Re: @h4rmony and your comparison rules
>>This is a lot of writing and looks pretty ugly. I'd prefer a much simpler syntax like this one:
I probably shouldn't indulge this. Your initial attack was to demand whether Outlook could be used by scripting. Having been told that it can and much more (it has a full OO API) you shift goal posts and say there's too much "writing" for your tastes. However, I can see where this road leads and it's not to a good place for your argument, so I'll allow you to shift the goal posts a little closer to the cliff if you wish.
Basically, you don't understand what is happening here. I'll illustrate the difference. Here's a short sample of a script that works with Outlook. It's creating and sending an email.
$ol = New-Object -comObject Outlook.Application
gm -InputObject $ol
$mail = $ol.Session.OpenSharedItem("C:\Test Email Subject.msg")
$Mail.Subject = "Test Mail"
$Mail.Body = " Here is some text"
Here's what you prefer because you think it's shorter and simpler:
Here's my message.... " | mutt -F ~/.mutt/one_of_myprofyles -s "Hi from me" firstname.lastname@example.org -a ~/Documents/attached.pdf
Firstly, the former isn't long - it's eight lines, one statement on each and anyone remotely competent should be able to handle that. ;)
The reason yours is short is because all you're doing is piping text to the Mutt program and using command line flags. The Outlook example is Object Oriented code that lets you instantiate an instance of Outlook, an instance of a mail object, perform operations on those instances and do pretty much anything you want with them, clone them, copy them, feed them as objects to other programs... It's vastly more powerful than piping text to Mutt on the command line. If you don't understand that, then you are not a programmer.