Perl 通过SMTP发送正文为HTML格式的邮件
use strict;use MIME::Lite;
my $mailhost="smtp.163.com";
my $username="test\@163.com";
my $password="test";
my $data='
title
hello world
';
my $msg=MIME::Lite->new(
From=>"$username",
To=>"$username",
Subject=>"title",
Type=>"text/html",
Data=>"$data"
);
$msg->send('smtp',$mailhost,AuthUser=>$username,AuthPass=>$password);
页:
[1]