yes this will send one mail with attachment of image.png. But when i open or download that image, that is empty.? imageurl = https://chart.googleapis.com/chart?chs=150x150&cht... require 'open-uri' class UserMailer < ActionMailer::Base default :from => "mail@example.com" def welcome_email(imageurl,mailid) attachments['QR.png'] = {:mime_type => 'image/png', :content => open(URI.parse(imageURL))} mail(:to => mailid, :subject => "Code", :body => "Code") end end Thanks vishnu
on 2012-07-31 12:30
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.