-
Notifications
You must be signed in to change notification settings - Fork 22
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
mixed + alternative not supported #25
Comments
Gotta be a bug. I need to make a run through the bugs on E-S and will check it out when I get there. |
Any progress on patching this? |
Workaround:
|
Thx biggle1856, I will test that out at work 👍 |
I've written a patch to fix this issue. I will test it over the next couple of days, and then submit a PR. Issue #33 should probably be closed, as it is a duplicate of this one. |
PR 40 submitted :) |
Here's a modified workaround, based on the one above by biggles1856 (thanks!). When I tried that one, the text body got lost. Not sure why, but it's possibly related to the following note in
This version seems to work: my $mail = Email::Stuffer->new({ transport => $transport })
->to($to)
->from($from)
->subject($subject)
->text_body($plain_text)
->html_body($html_text);
if ($attachment) {
$mail->{parts} = [ Email::MIME->create(
attributes => {content_type => q(multipart/alternative)},
parts => $mail->{parts}
) ];
$mail->attach_file($attachment, filename => $filename, disposition => 'attachment');
} |
For those curious, biggle1856's solution should work ... if you change That Kind of funny (and unfortunate), with Anyway, would be nice to have this functionality provided by default, whether merging PR #41 as-is or updated, or offering any other interface. |
docs should indicate that you can't use both
text_body
,html_body
, withattach
. Maybe in TODO orattach
/attach_file
sections?E.g.:
Produces
multipart/mixed
header with 3 parts; but nomultipart/alternative
Should be two parts,
multipart/alternative
and the attachment, both inside amultipart/mixed
The text was updated successfully, but these errors were encountered: