我正在使用来自https://github.com/mikel/mailmail
的gem
我用它来解析原始邮件数据:例如
require 'mail'
maildata = Mail.new(body) #where body is the raw text of an email message
#from there I can see info such as
p maildata.body.decoded #displays the decoded email body
p maildata.from #shows who the email is from
我如何确定电子邮件是否存在plaintext
或html
是否有内置方法来执行此操作?