Send email via task and groovy script

I’m trying to go further : using org.apache.commons.mail.HtmlEmail

Then this error is throwed :
javax.activation.UnsupportedDataTypeException: no object DCH for MIME type multipart/alternative

Maybe something like that could work : groovy - Sending an email: no object DCH for MIME type multipart/mixed - Stack Overflow ?