这里我需要用邮件附上一张图片,像这样传递的图片
**imageurl** = "https://chart.googleapis.com/chart?chs=200x200&cht=qr&chl=%22hai%22&choe=UTF-8"
class UserMailer < ActionMailer::Base
default :from => "mail@example.com"
def welcome_email(**imageurl**,bname,mailid)
**attachments['image.png'] = File.read(imageURL)**
mail(:to => mailid,
:subject => "Code for "+bname+"",
:body => "code for bname" )
end
end
end
在这里我遇到了一些附件错误。这个附件有什么变化吗?
谢谢