【发布时间】:2023-03-29 06:15:01
【问题描述】:
我正在使用Mail Gem 发送电子邮件。我正在尝试使用如下内联图像标签发送.PNG 文件
record_stream << "<br /> <p>Jeff added an image today.</p>"
.concat( "<img src="pngImagePath" /> " )
mail = Mail.new do
from 'from@gmail.com'
to 'some@gmail.com'
subject "Automated Report
html_part do
body "<i>This is an automated email. All data in this email was generated automatically.</i>
#{record_stream}
"
end
end #### End of mailer
但是当我检查我的 gmail 时,record_stream 没有出现。既不是字符串也不是图像。我想在电子邮件正文中显示两者。任何帮助将不胜感激。谢谢
【问题讨论】:
标签: ruby-on-rails ruby rubygems mail-gem