I’m trying to avoid sending large PDF’s via email. My current
strategy is to put a link to the document or web page into the e-mail,
and it works just fine, but I’m getting complaints that “the
attachment is missing”. Is there a way to have a link show up as an
I’ve tried to use the RFC 2017 strategy of using content type message/
external-body, but I don’t think rails is formatting the attachment
quite right, or maybe outlook (majority of receivers use outlook)
doesn’t understand it?
part :content_type => "multipart/alternative" do |a| a.part "text/plain" do |p| p.body = render_message 'mailing.text.plain.rhtml', :mailing
a.part "text/html" do |p| p.body = render_message 'mailing.text.html.rhtml', :mailing
attachment :content_type => "message/external-body; access-
type=URL;" do |a|
a.transfer_encoding = “binary”
a.body = “URL=“http://www.biltd.com”\n\nContent-type: text/html
\nContent-Transfer-Encoding: Binary\n\nTHIS IS NOT THE BODY!\n”
Produces, in part:
Content-Type: message/external-body; access-type=URL
Content-Disposition: attachment; access-type=URL
THIS IS NOT THE BODY!
Which doesn’t look quite like RFC2017 shows. There seems to be an
extra new line, and a couple extra headers. RFC2017 expects the mime
body to look like:
Content-type: message/external-body; access-type=URL;
THIS IS NOT REALLY THE BODY!