我正在使用以下样式解析电子邮件
message = Mail.new(body) #where body is the RAW source from the email server
message.subject #=> the subject of the message as a string
message.from #=> shows who the email is from
如果“回复”字段存在,我如何获取它的值? gem 可以做到这一点吗?
最佳答案
您需要 reply_to
方法:
message.reply_to
# => ["user@example.com"]
如果没有回复集,则为 nil:
message.reply_to
# => nil
我建议您查看 RDoc documentation ,专门针对 Message object .这将显示您的 message
实例上可用的所有方法。
关于ruby-on-rails - ruby 'mikel/mail' 回复字段,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10115192/