[Catalyst] Catalyst::View::Email broken?

Bernhard Graf catalyst3 at augensalat.de
Mon Jan 7 23:27:10 GMT 2008


I'm unable to create multipart/alternative email with C:V:Email 0.10.

This worked with 0.06:
$stash->{email} = {
        header => [ From => $from, To => $to, Subject => $subject],
        content_type => 'multipart/alternative',
        parts => [
            Email::MIME->create(
                attributes => {
                    content_type => 'text/plain',
                    charset => $cs_plain,
                    encoding => $enc_plain,
                },
                body => $plain,
            ),
            Email::MIME->create(
                attributes => {
                    content_type => 'text/html',
                    charset => $cs_html,
                    encoding => $enc_html,
                },
                body => $html,
            ),
        ],
}

From how I see the code, it is broken at least in process:

    my %mime = ( header => $header );

    if ( $parts and ref $parts eq 'ARRAY' ) {
        $mime{parts} = $parts;
    } else {
        $mime{body} = $body;
    }

    if ( $mime{attributes} and not $mime{attributes}->{charset} and
         $self->{default}->{charset} )
    {
        $mime{attributes}->{charset} = $self->{default}->{charset};
    }

$mime{attributes} is queried here, but never set.
-- 
Bernhard Graf



More information about the Catalyst mailing list