From: Mikel Lindsaar Date: 2008-03-15T07:13:55+09:00 Subject: Re: Help with IMAP and mime On Sat, Mar 15, 2008 at 7:54 AM, CParticle wrote: > I'm using net/imap and rmail to get and put data onto the imap > server. I'd like to set the header correctly so that I can write the > data to the server such that it understand what it is. In this case a > calendar item. The idea being that I could then write a calendar item > directly to my calendar on my exchange server and exchange would treat > it as such. I don't know if this is exactly what you need, but you can do that with TMail with: irb(main):001:0> require 'rubygems' irb(main):002:0> require 'tmail' irb(main):003:0> mail = TMail::Mail.new irb(main):004:0> mail['header'] = 'Content-Type=text/calendar, param={"METHOD" => "REQUEST"}' => "Content-Type=text/calendar, param={\"METHOD\" => \"REQUEST\"}" irb(main):005:0> puts mail.encoded Header: Content-Type=text/calendar, param={"METHOD" => "REQUEST"} Would mean using TMail, it is heavier than RMail, both are good, YMMV. You might also want to get onto the TMail Talk mailing list or have a look through the recently updated RDocs at the website; http://tmail.rubyforge.org/ Mikel Lindsaar http://lindsaar.net/