Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
sub send_mail {
my($to, $from, $subject, @body) = @_;
use Net::SMTP;
my $relay = "host.com";
my $smtp = Net::SMTP->new($relay)
|| die "Can't open mail connection: $!";
[tab]$smtp->mail($from);
[tab]$smtp->to($to);
[tab]$smtp->data();
[tab]$smtp->datasend("To: $to\n");
[tab]$smtp->datasend("From: $from\n");
[tab]$smtp->datasend("Subject: $subject\n");
[tab]$smtp->datasend("\n");
[tab]foreach $body (@body) {
[tab][tab]$smtp->datasend("$body\n");
[tab]}
[tab]$smtp->dataend();
[tab]$smtp->quit();
}
use MIME::Lite;
#.....
sub Mail_File {
my $fileName = $_[0]; # To attach
my $myMailAddress = $_[1]; # Your email address / address e-mail should appear from
my $email_address = $_[2]; # Recipients mail address
my $title = $_[3]; # Email title
my $body_message = $_[4]; # Text in main part of e-mail
my $fileType = $_[5]; # Know whether attachment is 'BINARY' or 'TEXT'
my $fileName = $_[6]; # Name of file to attach (including path)
my $outFileName = $_[7]; # Name to give e-mail attachment
# Create MIME::Lite mail object
my $msg = MIME::Lite->new(
From => $myMailAddress,
To => $email_address,
Subject => $title,
Type => 'multipart/mixed',
);
# Main Body of message
$msg->attach(
Type => 'TEXT',
Data => $body_message
);
# Attach file here
$msg->attach(Type => $fileType,
Path => $fileName,
Filename => $outFileName,
Disposition => 'attachment'
);
# Send e-mail
$msg->send();
} # end sub Mail_File