i have a perl script that send an email after a from submission.
the email is received with plain text.
i would like to apply html tags to the body of the email and i would like to see if someone can help me implement the mime::lite module to my current script if not much to ask for.
i am pasting the code below, it is really small.
my $cgi = new CGI;
my $to = $_;
my $subject = $_;
my $body = $_;
my $from = $_;
if (not $smtp = Net::SMTP->new('mail.server.com', Port => 25, Debug => 1))
die "Could not connect to server\n";
$smtp->mail($from . "\n");
my @recepients = split(/,/, $to);
foreach my $recp (@recepients)
$smtp->to($recp . "\n");
$smtp->datasend("From: " . $from . "\n");
$smtp->datasend("To: " . $to . "\n");
$smtp->datasend("Subject: " . $subject . "\n");
$smtp->datasend($body . "\n");
# Send away!
&send_mail($cgi->param('to'), $cgi->param('subject'), $cgi->param('body'), $cgi->param('from'));
print '<html><body>Your e-mail has been sent</body></html>';