Hallo,

schau dir mal dieses Ticket[1] an. Ich habe daraus die
actionmailer_inline_images.rb verwendet. Außerdem solltest du dir den
Quelltext von ein paar Mails anschauen, die das machen. Damit du
weißt, wie es am Ende aussehen muss. Stichwort hier, wäre cid.

Ich hab das schonmal gemacht, kann aber nur ein paar Ausschnitte
posten. Die Mail war wie folgt strukturiert.

  content_type "multipart/alternative"
  part :content_type => "text/plain"
       :body => "Die Alternative für HTML-Mail-Verächter"
  part :content_type => "multipart/related" do |p|
    p.part :content_type => "text/html", :body =>
render_message(dateiname, body_attribute)
    p.inline_attachment :content_type     => "image/png",
                        :filename          => "dein_bild.png",
                        :cid               => "<dein_bild>",
                        :body              => File.read(RAILS_ROOT +
"/public/images/dein_bild.png")
    p.inline_attachment :content_type     => "image/png",
                        :filename          => "dein_bild2.png",
                        :cid               => "<dein_bild2>",
                        :body              => File.read(RAILS_ROOT +
"/public/images/dein_bild.png")
  end

Damit hast du dann eine Text- und HTML-Mail in einem und der Client
kann sich aussuchen, welche Version ihm lieber ist.

Viele Grüße

Gregor
_______________________________________________
rubyonrails-ug mailing list
[email protected]
http://mailman.headflash.com/mailman/listinfo/rubyonrails-ug

Antwort per Email an