Can I choose where an attachment appears in an email using ActionMailer in Ruby On Rails? -


i have following statement in mailer 1 of emails being sent.

attachments.inline['ebooksample.pdf'] = file.read('app/assets/images/ebooksample.pdf') 

normally pdf documents have appeared @ bottom of email design. 1 of email select pdf attachment appears in email.

i know image_tag attachments statement can use images.

<%= image_tag attachments['image.jpg'].url %> 

does similar exist documents where can position pdf attachment in email?

there incredibly few mail systems allow insert non-image attachments e-mail body. ibm lotus 1 have knowledge of.

for reason, nobody bothered adding functionality actionmailer.

attempting render pdf file inside e-mail's body yield actual bytes make file. won't nice view.

i'm suggesting following workaround:

  • add non-image attachments regular attachments. show @ end of file, in gmail, or in "attached" bar, in outlook.
  • in e-mail body, add hyperlinks copies of attachments. these copies of course need stored on server, , accessible online.

Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -