【问题标题】:Rails ActionMailer Content-Type" => "text/Calendar' for iCalendarRails ActionMailer Content-Type" => "text/Calendar' for iCalendar
【发布时间】:2012-10-16 22:42:35
【问题描述】:

在 webapps 中,我正在生成一个 ics 字符串,用于通过邮件发送邀请。

我正在使用 icalendar gem 生成 ics 字符串,但我需要使用 Content-Type 发送:文本/日历。

我如何设置 ActionMailer 来做到这一点?

谢谢

【问题讨论】:

    标签: ruby-on-rails ruby actionmailer icalendar


    【解决方案1】:

    您可以在文档中查看如何操作:

    ActionMailer 在默认哈希部分

    喜欢

    class Notifier < ActionMailer::Base
      def some_message(recipient)
        content-type "your type"
      end
    end
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-05-19
      • 2013-06-03
      • 1970-01-01
      • 1970-01-01
      • 2016-01-23
      • 2018-11-12
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多