in reply to Re^3: problem with Mail::Sender while sending email
in thread problem with Mail::Sender while sending email

You don't need a heredoc when you have the text in a variable already.

use this instead
->Part({ ctype => 'text/html', disposition => 'NONE', msg => $var})