<div dir="ltr">I have not been using multipart so far, though I may do in the future. HTH.<br><div><br><br><br><span style="font-family:monospace,monospace">use Email::MIME::CreateHTML;<br>use Email::Sender::Simple qw(sendmail);<br>use Email::Sender::Transport::SMTP qw();<br>...<br> my $email_body = template(<br> $tt,<br> \%fields,<br> );<br> # produce an Email::Abstract compatible message object,<br> my $email = Email::MIME->create_html(<br> header =><br> [<br> From => $fields{email_from},<br> To => $fields{email},<br> Subject => $fields{email_subject},<br> ],<br> body => $email_body,<br> );<br><br> try {<br> sendmail($email,<br> {<br> from => $fields{email_from},<br> transport => Email::Sender::Transport::SMTP->new({<br> host => config->{smtp_server},<br> port => config->{smtp_port},<br> }),<br> }<br> );<br> } catch {<br>..<br></span><br></div><div class="gmail_extra"><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
[testemail:37988] error @2016-01-26 14:46:09> Route exception: Could not<br>
send email can't build entity: no body, and not multipart<br>
<br>
I am getting a multipart warning because I didn't specify "multipart =><br>
'related'" in email function. I believe, Dancer2 requires "multipart" to<br>
be set to "related" when you want to send HTML emails.</blockquote></div></div></div>