Hi,
I wanted to send an attachment in mail.
for testing , I have send png image attachement in mail. Mail delivery
is
completely working but the attachment in that mail show file name as
"nonname"
what should i do??
My code is:
class SendMail < ActionMailer::Base
default :from => "XXXX@gmail.com"
def welcome
attachments["adfd.txt"] =
File.read("#{Rails.root}/public/images/f.txt")
mail(:to => "XXX@gmail.com",
:subject => "welcome mail").deliver
end
end
on 2011-06-27 10: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.