New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Padrino::Mailer::Mime.mime_type #1697

Merged
merged 1 commit into from Jun 14, 2014

Conversation

Projects
None yet
2 participants
@tyabe
Contributor

tyabe commented Jun 14, 2014

If we called #encoded or #to_s of mail message object,
charset will be append to the 'content_type' of the mail-header.
In this state, Messge#content_type return incorrect value.

message = Sample::App._padrino_mailer::Message.new { content_type 'text/html'; body 'I wanna eat sushi.' }
message.header['content_type'].to_s # => "text/html"
message.content_type #=> :html

message.encoded # or #to_s

message.header['content_type'].to_s #=> "text/html; charset=UTF-8"
message.content_type #=> :plain

This PR will fix it.

message = Sample::App._padrino_mailer::Message.new { content_type 'text/html'; body 'I wanna eat sushi.' }
message.header['content_type'].to_s # => "text/html"
message.content_type #=> :html

message.encoded # or #to_s

message.header['content_type'].to_s #=> "text/html; charset=UTF-8"
message.content_type #=> :html
@ujifgc

This comment has been minimized.

Show comment
Hide comment
@ujifgc

ujifgc Jun 14, 2014

Member

Thanks!

Member

ujifgc commented Jun 14, 2014

Thanks!

ujifgc added a commit that referenced this pull request Jun 14, 2014

Merge pull request #1697 from tyabe/fix_mime_type
Fix Padrino::Mailer::Mime.mime_type

@ujifgc ujifgc merged commit 0f75ab8 into padrino:master Jun 14, 2014

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details

@tyabe tyabe deleted the tyabe:fix_mime_type branch Jun 14, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment