mail attachments displayed strangly in Rails 3.1

My problem is that even though the format is perceived correctly in the mail it only shows text for my attachments. All files are pre-uploaded and just hooked on from the folder they're contained in the public folder. I send my emails through smtp in my dev / prod) environment file. I Run Rails 3.1 and Ruby 1.9.3.

Extraction from an email:

----==_mimepart_4eef18cd87cdb_145c160c9e899096 Mime-Version: 1.0 Content-Type: image/jpeg; charset=UTF-8; filename=7339a0207435.jpg Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=7339a0207435.jpg

From here on only a clutter of chars is rendered in the mail.

Any clue to how I can fix this? As far as I know it used to work in Rails 3.0.

Code from my mailer class:

def send_email(supervisormail, user, params)

@supervisormail = supervisormail @user = user acase =

if Uploadcontent.count(:conditions => ["case_id = #{}"]) > 0

  acase.uploadcontents.each do |uc|

    if params[]

      attachments[uc.filename] ='public/uploadedfiles/' + uc.filename)



end mail(:to =>, :subject => supervisormail.subject, :from => supervisormail.from, :content_type => "text/plain")