本人亲自实验过,可以发成功!~~ windows系统,ruby2.0
require 'win32ole'
outlook = WIN32OLE.new('Outlook.Application')
message = outlook.CreateItem(0)
message.Subject = 'Subject line here'
message.Body = 'This is the body of your message.'
message.To = 'xiaofan2350@yahoo.com.cn'
message.Attachments.Add('c:\really\one.txt', 1)
message.Send
require 'win32ole'
outlook = WIN32OLE.new('Outlook.Application')
message = outlook.CreateItem(0)
message.Subject = 'Subject line here'
message.Body = 'This is the body of your message.'
message.To = 'xiaofan2350@yahoo.com.cn'
message.Attachments.Add('c:\really\one.txt', 1)
message.Send
