I'm trying to send an email with a pdf attachment but the file comes embeded in email body on this form :
+212 319 9200 --mimepart_4610c204ab1b1_309b..fdbf7a3ea954 Content-Type: multipart/mixed; boundary=mimepart_4610c204ab4f8_309b..fdbf7a3ea105d --mimepart_4610c204ab4f8_309b..fdbf7a3ea105d Content-Type: application/pdf; charset=utf-8 Content-Transfer-Encoding: Base64 Content-Disposition: inline JVBERi0xLjMKMyAwIG9iago8PC9UeXBlIC9QYWdlCi9QYXJlbnQgMSAwIFIK L1Jlc291cmNlcyAyIDAgUgovQW5ub3RzIFs8PC9UeXBlIC9Bbm5vdCAvU3ViEtc..
this my configuration:
# CONFIGURATION ActionMailer
ActionMailer::Base.delivery_method = :sendmail
ActionMailer::Base.perform_deliveries = true
ActionMailer::Base.raise_delivery_errors = true
ActionMailer::Base.default_charset = "utf-8"
and this is my model
part 'multipart/mixed' do |p|
p.content_type='text/html'
p.part :content_type => "application/pdf",
:content_disposition => 'inline',
:body => File.read(RAILS_ROOT + "/public/images/pdf/07032701s.pdf"),
:filename => File.read(RAILS_ROOT + "/public/images/pdf/07032701s.pdf"),
:transfer_encoding => "Base64",
:charset => "utf-8"
Does anyone have a simple solution to this problem?
Thanks in advance,