/ Published in: Ruby

Simple Outlook automation, the idea is to use this in cygwin to send files without opening the outlook UI, to use it place the code under /bin folder and make it executable with chmod +x.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
#!/usr/bin/ruby require 'win32ole' f = IO.popen("cygpath -w "+ARGV[1].to_s) path= f.gets.strip outlook = WIN32OLE.new('Outlook.Application') message = outlook.CreateItem(0) message.Subject = 'see attached file' message.Body = '' message.To = ARGV[0] message.Attachments.Add(path, 1) message.Send
Comments
