Re: Inline attachment

Saboor
Mon, 22 Feb 2010 10:12:34 -0000

hi,
try this, it is working fine.
for inline attachment.................................
 attachment :content_type => "application/html",
                   :filename     => filename,
                  :body         => File.read(filename)


@cid=''logo.jpg-72ZkFAYT80L8TXn3tpL0tAC/G2K4zDHf@public.gmane.org''
    image_path = "#{RAILS_ROOT}/public/images/logo.jpg"
    f=File.open(image_path,''rb'')
    inline_attachment :content_type => "image/jpg",
                      :body => f.read,
                      :filename => "logo.jpg",
                      :cid => ''<#{@cid}>''
   body[:cid] = @cid

for display image in email
try this