use strict; use MIME::Lite; # SendTo email id my $email = 'a@example.com'; MIME::Lite->send('smtp','example.com',Debug=>1) || die $!; # create a new MIME Lite based email my $msg = MIME::Lite->new ( Subject => "HTML email test", From => 'x@example.com', To => $email, Type => 'text/html', Data => '