I am trying to send email with attachments using Ruby on Rails. I followed the instructions from the ActionMailer site.
def welcome(recipient)
@account = recipient
attachments['file.csv'] = File.read('/path/to/users.csv')
mail(:to => recipient,
:bcc => ["email@example.com", "email2@example.com"],
:subject => "Sending attachment")
end
I am able to receive emails but without the attachment, I am trying to attach csv file but I am getting a file called "noname" as attachment