ironcamel / Dancer-Plugin-Email

Simple email sending for Dancer
http://p3rl.org/Dancer::Plugin::Email
6 stars 10 forks source link

Reintroduce type parameter lost in the rewrite for Email::Sender. #12

Open racke opened 12 years ago

racke commented 12 years ago

Proposed fix for the following GitHub issue:

https://github.com/ironcamel/Dancer-Plugin-Email/issues/10

Regards Racke

racke commented 12 years ago

Note: MIME::Entity doesn't seem to support Format 'flowed'.

Regards Racke

ironcamel commented 12 years ago

I used part of your patch to add support for html and plain text emails. I have not yet added support for type 'multi'. Take a look: https://github.com/ironcamel/Dancer-Plugin-Email/commit/1e66a34271e4ebdb162a158ff6922621df82b725

ironcamel commented 12 years ago

I added a line:

    $headers{Format} ||= 'flowed' if $headers{Type} eq 'text/plain';

I noticed that you said MIME::Entity does not support Format 'flowed'. I am assuming that MIME::Entity would just pass that header on to the client and it is the job of the client to support format flowed or not. I'm not sure how exactly to test format 'flowed', but leaving that line at least does not seem to break anything.