Shyam Sankar
2006-Nov-27 22:31 UTC
[Vpim-talk] Fwd: can''t open ics encoded output in outlook 2003
I''m trying to attach ics files to emails that my application sends out.
Only problem is that while applications like gmail understand and correctly
parse the attachment, I can''t get outlook to do the same.
First my attachment settings:
:content_type => ''multipart/mixed'' # I have to use this
since
''text/calendar'' doesn''t work-- outlook things it is
an untitled email .msg
attachment
:transfer_encoding => ''Base64'' #I also tried
''Quoted-printable'' to no
success
body of attachment
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Ensemble Independent//vPim 0.360//EN
CALSCALE:Gregorian
BEGIN:VEVENT
DTSTART:20061127T120200
DTEND:20061127T130200
SUMMARY:For Shyam TEST:Sh yam (54)
DESCRIPTION:---\nNote from Sankar, Shyam on 20061113T132704Z\ntest\n
CATEGORIES:APPOINTMENT,RECRUITING
SEQUENCE:0
CREATED:20061127T131016
LAST-MODIFIED:20061127T131016
ORGANIZER;CN="Sankar, Shyam":mailto:ssankar at gmail.com
ATTENDEE;RSVP=true:mailto:ssankar at palantirtech.com
UID:20061127T131016Z_297365195 at SSANKAR
END:VEVENT
END:VCALENDAR
code the generates the body:
def generate_vpim_ical(notify_users_array)
require ''vpim/icalendar''
cal = Vpim:: Icalendar.create2
cal.add_event do |e|
e.dtstart self.start_time
e.dtend self.end_time
e.summary self.description + ":" +
self.candidate.print_name_and_id
notes = History.get_recent_notes(self.candidate,2)
desc = ""
for n in notes
desc << "Note from " + n.user.printname + " on
" +
n.created_at.strftime("%Y%m%dT%H%M%SZ") + "\n"
desc << n.user_notes
desc << "\n"
end
e.description desc #TODO: last note and candidate url/resume url
e.categories [ ''APPOINTMENT'']
e.categories do |c| c.push ''RECRUITING'' end
e.sequence 0
e.transparency ''OPAQUE''
now = Time.now
e.created now
e.lastmod now
e.organizer do |o|
o.cn = self.user.printname
o.uri = "mailto:" + self.user.email
end
for user in notify_users_array
attendee = Vpim::Icalendar::Address.create(''mailto:'' +
user.email)
attendee.rsvp = true
e.add_attendee attendee
end
e.uid
"#{Time.now.localtime.strftime("%Y%m%dT%H%M%SZ")}_#{rand(999999999)}@#{
Socket.gethostname}
end
What am I doing wrong?
--
Shyam Sankar
2142 University Ave
Mountain View, CA 94040
+1.415.244.5545
ssankar at gmail.com
--
Shyam Sankar
2142 University Ave
Mountain View, CA 94040
+1.415.244.5545
ssankar at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://rubyforge.org/pipermail/vpim-talk/attachments/20061127/84573eaa/attachment.html
Sam Roberts
2006-Nov-28 22:29 UTC
[Vpim-talk] can''t open ics encoded output in outlook 2003
On Mon, Nov 27, 2006 at 02:31:11PM -0800, Shyam Sankar wrote:> I''m trying to attach ics files to emails that my application sends out. > Only problem is that while applications like gmail understand and correctly > parse the attachment, I can''t get outlook to do the same.I''ve never attached a calendar to an email, so I can''t tell you why Outlook does or doesn''t like the attachment. You should probably be familiar with the iMIP RFCs, and I''d also suggest finding a message that Outlook does accept (maybe mail a calendar with Outlook to get one), see what they do, and see if you can do likewise. Post back when you figure it out, it will probably help somebody else. Cheers, Sam