- my $html_body = "<html><body>hi</body></html>";
- my $parts = [
- Email::MIME->create(
- attributes => {
- content_type => 'text/xhtml; charset=UTF-8',
- encoding => 'base64',
- },
- body => $html_body,
- ),
- Email::MIME->create(
- attributes => {
- content_type => 'text/plain',
- encoding => 'quoted-printable',
- },
- body => 'hi = "bye"',
- )
- ];
- my $email = Email::MIME->create(
- header_str => [
- From => 'a@example.com',
- Subject => 'blah',
- 'Content-Type' => 'multipart/alternative'
- ],
- parts => $parts,
- );