我有这样的代码
Mailman::Application.run do
to 'email@local.com' do
## how to get subject, from and body in here
end
end如何在rails中从电子邮件中获取主题、发件人和正文?
发布于 2018-08-04 11:27:06
使用邮件gem https://github.com/mikel/mail/
Mailman::Application.run do
default do
mail = Mail.new(message)
from = message.from.first
content = mail.parts[1].body.decoded
subject = message.subject
//your other code
end
endhttps://stackoverflow.com/questions/19508754
复制相似问题