Skip to content

Commit

Permalink
allow to remove the charset
Browse files Browse the repository at this point in the history
  • Loading branch information
ahorek committed Jan 9, 2019
1 parent cce11dc commit 1ce3b81
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/mail/message.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1477,7 +1477,9 @@ def add_charset
warning = "Non US-ASCII detected and no charset defined.\nDefaulting to UTF-8, set your own if this is incorrect.\n"
warn(warning)
end
header[:content_type].parameters['charset'] = @charset
if @charset
header[:content_type].parameters['charset'] = @charset
end
end
end

Expand All @@ -1503,8 +1505,8 @@ def charset
# Sets the charset to the supplied value.
def charset=(value)
@defaulted_charset = false
@charset = value
if value
@charset = value
@header.charset = value
end
end
Expand Down

0 comments on commit 1ce3b81

Please sign in to comment.