Created
September 15, 2016 08:30
-
-
Save vmi/2f3d340e9776519ee6e2a0da5229f7b8 to your computer and use it in GitHub Desktop.
Outlookメール作成覚え書き
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'win32ole' | |
# 参考 | |
# - Using Automation to Send a Microsoft Outlook Message | |
# https://support.microsoft.com/en-us/kb/161088 | |
# - Office の開発 > Office クライアント > Outlook | |
# https://msdn.microsoft.com/ja-jp/library/office/fp161224.aspx | |
outlook = WIN32OLE.connect("Outlook.Application") | |
mail = outlook.CreateItem(0) | |
mail.Subject = "サブジェクト" | |
mail.To = "送信先" # 複数のアドレスに送信したい場合は Recipients を操作する | |
mail.Body = "本文" # 改行は "\r\n" | |
mail.Display |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment