我有 ActionMailer 工作并发送普通电子邮件。但是当我尝试附加文件时,我得到:#<Encoding::UndefinedConversionError: "\xFF" from ASCII-8BIT to UTF-8> - nil
我这样做的片段是:
mail(subject: "test test",
from: "o@myemail.com",
to: ["b@reciepient.com"],
date: Time.now,
content_type: "text/html",
attachments[file[:filename]] => file[:data] )
有什么建议可能会出错吗?
谢谢!