Subject: | Order of methods matter in Email::Stuffer 0.012 |
Date: | Thu, 7 May 2015 19:54:21 +0300 |
To: | bug-email-stuffer [...] rt.cpan.org |
From: | Gabor Szabo <gabor [...] szabgab.com> |
Thank you for the great module!
I just bumped into this issue using Email::Stuffer 0.012
If I create the email this way:
Email::Stuffer->text_body($text)->subject($subject)->from($from)->to($to)->send;
The generated e-mail in my Mailfolder looks like this:
-------------------------------
Date: Thu, 7 May 2015 19:47:04 +0300
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"; format="flowed"
Content-Transfer-Encoding: quoted-printable
Subject: Experiment
X-Email-Sender-From: gabor@perlmaven.com
X-Email-Sender-To: gabor@szabgab.com
Lines: 1
Text
-------------------------------
and the message is rejected by Google due to lack of RFC conformity.
If I change the order of the calls to
Email::Stuffer->text_body($text)->from($from)->to($to)->subject($subject)->send;
-----------------------------
Date: Thu, 7 May 2015 19:51:12 +0300
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8";
format="flowed"Content-Transfer-Encoding: quoted-printable
From: G Sz <gabor@perlmaven.com>
To: gabor@szabgab.com
Subject: Experiment
X-Email-Sender-From: gabor@perlmaven.com
X-Email-Sender-To: gabor@szabgab.com
Lines: 2
Experimental message
------------------------------
and the message is delivered properly.
I don't think I saw in the docs that the order matters. So this seems to be
either a bug in the code or a need to updated the docs.
Gabor