【发布时间】:2011-07-01 01:21:56
【问题描述】:
我正在使用 ri_cal gem 生成 ics 文件。
在我的邮件中:--
def appointment_book(appointment,recipient,appointment_with)
event = RiCal.Event do
description "MA-6 First US Manned Spaceflight"
dtstart DateTime.parse(appointment.slot.date_on.strftime("%m/%d/%Y").to_s + " " + appointment.slot.start_time.strftime("%I.%M %p").to_s)
dtend DateTime.parse(appointment.slot.date_on.strftime("%m/%d/%Y").to_s + " " + appointment.slot.end_time.strftime("%I.%M %p").to_s)
add_attendee appointment_with.full_name
alarm do
description "Segment 51"
end
end
attachments['event.ics'] = {
:mime_type => 'text/calendar',
:content => event.export
}
@recipient = recipient
@appointment = appointment
mail(:to => recipient.email, :subject => "Appointment book")
end
在 appintment_book.text.erb 文件中
(some simple variable values or plain text.)
问题是(在雅虎,特别是较新的版本。我在编辑部分添加截图):--
附件是有邮件的,但是除了gmail的邮件内容外,还有一些vcard和其他内容。如果我删除 ics_generation 代码,那么它就消失了。请查看截图
在 gmail 中它看起来像(也在处理 hotmail):--
编辑
在 yahoo Classic 中工作。
不适用于新雅虎:--
【问题讨论】:
-
在我的测试中,这个问题不仅限于 ICS 文件;来自 Rails 的 VCF 和纯文本文件在 Yahoo! 中引起了同样的问题。邮件。
标签: ruby-on-rails email ruby-on-rails-3 yahoo icalendar