Fix for emails with empty body
This commit is contained in:
parent
2319a824f8
commit
e0b9117f15
|
@ -7,7 +7,9 @@ module Email
|
|||
builder = Email::MessageBuilder.new(*builder_args)
|
||||
headers(builder.header_args) if builder.header_args.present?
|
||||
mail(builder.build_args).tap { |message|
|
||||
message.html_part = builder.html_part if message
|
||||
if message and h = builder.html_part
|
||||
message.html_part = h
|
||||
end
|
||||
}
|
||||
end
|
||||
end
|
||||
|
|
|
@ -39,7 +39,7 @@ module Email
|
|||
end
|
||||
end
|
||||
|
||||
@message.parts[0].body = @message.parts[0].body.to_s.gsub!(/\[\/?email-indent\]/, '')
|
||||
@message.parts[0].body = @message.parts[0].body.to_s.gsub(/\[\/?email-indent\]/, '')
|
||||
|
||||
@message.text_part.content_type = 'text/plain; charset=UTF-8'
|
||||
|
||||
|
|
Loading…
Reference in New Issue