2011-05-25 73 views
2

我需要您的观点,因为我不知道它是否可行。如何使用导轨发送“标记为重要”邮件

我想通过我的应用程序发送一些电子邮件应该'Mark as Important',以便当最终用户在那里收到这个邮件Evolution/Outlook他们应该知道电子邮件的重要性。

目前,当我使用evolution标记任何电子邮件为'Mark as Important'它将邮件主题和其他字段的颜色更改为red

回答

0

MIME RFC将重要性列为可以通过MIME电子邮件发送的标头。可以使用的值高,正常或低。要发送调整后重要性的电子邮件,请使用API​​,通过API方法设置重要性,或允许您设置单个标题的API(例如TMail)。我不认识Ruby,所以我不能给你一个例子,但希望这能指出你正确的方向。

HTH。

6
class Notifier < ActionMailer::Base 
    default :from => '[email protected]', 
      :return_path => '[email protected]' 

    def welcome(recipient) 
    @account = recipient 
    mail(:to => recipient.email_address_with_name, 
     :bcc => ["[email protected]", "Order Watcher <[email protected]>"], 
     :subject => "No way!", 
     :importance => "High") # <====== 
    end 
    end 
+0

hey steenslag它不适合我.........请问你能给我更多的细节吗? – Salil 2011-05-26 06:18:43

+0

另外我使用rails 2.3.8 – Salil 2011-05-26 06:37:40

+0

我使用了header ['X-priority'] = 1,它适用于outlook express,但不适用于evolution,因为Evolution会忽略邮件优先级,因为它假设接收者应该决定信息是否重要。 – Salil 2011-05-26 08:23:13

7

两个其他答案都是正确的,但事情是,Outlook使用一个非标准的头信号的重要性。这就是所谓的X优先级,所以你必须将它包含在你的外发邮件中。对于较旧的Outlook,您还可以包含“X-MSMail-Priority:High”。


def notification 
    mail({ 
     :to => '[email protected]', 
     :subject => 'My subject', 
     :from => '[email protected]', 
     'Importance' => 'high', 
     'X-Priority' => '1'}) do |format| 
    format.text 
    format.html 
    end 
end 
相关问题