1
0
مراية لـ https://github.com/postalserver/postal.git تم المزامنة 2025-11-30 21:32:30 +00:00

don't create empty parts in a multi part email (#267)

هذا الالتزام موجود في:
Will Power
2017-07-25 15:47:18 +01:00
ملتزم من قبل Adam Cooke
الأصل f1bee5644b
التزام 457afb90c1

عرض الملف

@@ -163,11 +163,15 @@ class OutgoingMessagePrototype
if @html_body.blank? && attachments.empty?
mail.body = @plain_body
else
mail.text_part = Mail::Part.new
mail.text_part.body = @plain_body
mail.html_part = Mail::Part.new
mail.html_part.content_type = "text/html; charset=UTF-8"
mail.html_part.body = @html_body
if !@plain_body.blank?
mail.text_part = Mail::Part.new
mail.text_part.body = @plain_body
end
if !@html_body.blank?
mail.html_part = Mail::Part.new
mail.html_part.content_type = "text/html; charset=UTF-8"
mail.html_part.body = @html_body
end
end
attachments.each do |attachment|
mail.attachments[attachment[:name]] = {