email.pl
#!/usr/bin/env perl
use strict;
use warnings;
use MIME::Lite;
my $mailFrom = 'adming@example.com';
my $mailTo = 'user@example.com';
my $mail_file = "email.pl";
my $subject = "[Hi user]";
my $msg = MIME::Lite->new(
From => $mailFrom,
To => $mailTo,
Bcc => $mailTo,
Subject => $subject,
Type => 'text/plain',
Encoding => 'base64',
Path => $mail_file,
);
$msg->attach(
Type => 'text',
Path => 'email.md'
);
$msg->send('smtp', 'smtp.example.com');