if ( $template_res =~ /<MESSAGE>(.*)<END_MESSAGE>/s ) {
$body = $1;
$body =~ s|\n?(.*)\n?|$1|;
$body = encode_qp(Encode::encode("UTF-8", $body));
$body = encode_qp(Encode::encode("MIME-Q", $body));
}
my $boundary = "====" . time() . "====";