私は電子メール全体とその部分が正しい順序で生成されているところにあります。 :part_containerパラメータは、BELOWの代わりにtext/htmlの部分の上にインラインアタッチメントを挿入します。上の場合、Thunderbirdは何も表示せず、メールに2つの外部添付ファイルがあると表示されます。電子メールを手作業で編集して、text/html部分の下のインライン部分を移動すると、完全に表示されます。Rails 2.3 "inline_attachment" gemインラインアタッチメントの配置が正しくない
part :content_type => 'multipart/alternative' do |copy|
copy.part :content_type => 'text/plain' do |plain|
plain.body = render(
:file => "main.text.plain",
:body => {
:user => @user,
:text => docParse.to_plain_text
}
)
end
copy.part :content_type => 'multipart/related' do |rel|
rel.part :content_type => 'text/html' do |html|
html.body = render(
:file => "main.text.html",
:body => {
:part_container => rel,
:user => @user,
:content => content,
:email_links => m.email_links,
:nav_image => m.nav_image
}
)
end
end
end
m.attachments.each do |file|
attachment :content_type => "application/octet-stream",
:filename => File.basename(file),
:body => File.read(file)
end
明確にすることが、inline_attachments宝石は、このコードのいずれかなしに完璧に動作します - それは、私は、任意の外部の添付ファイル(のみインライン画像)せずにメールを送信していたときのみです。インライン画像と外部添付ファイルを含むHTMLメールを送信したいとき、これが私が頼りにしなければならないものです。
EDITは:明確にするために、私の質問は、「どのように私は、インライン取付部が使用してtext/htmlの部分の後に生成されていることを確認してくださいされています?part_containerを
ノーバディ:
これは私の問題でスクリプトを参照して、最新のスクリプトはありますか?ダム... – JakeTheSnake