#!/usr/bin/perl

use Getopt::Std;
use Net::SMTP::TLS;

getopt('ctsb', \ my %opts );

my $smtp = new Net::SMTP::TLS(
        'smtp.gmail.com',
        Port    =>      587,
        User    =>      'sangeethapriya.notification@gmail.com',
        Password=>      'sangeethamshare');
my $subj= '';

$smtp->mail("sangeethapriya.notification\@gmail.com");
$smtp->to($opts{t});
$subj= "Subject: $opts{s} \n";
$smtp->data;
$smtp->datasend("From: Sangeethapriya Notification <sangeethapriya.notification\@gmail.com>\n");
$smtp->datasend("To: $opts{t} \n");
$smtp->datasend("Bcc: $opts{c} \n");
$smtp->datasend($subj);
$smtp->datasend($opts{b});
$smtp->dataend;
$smtp->quit;
