my $config = Config::Tiny->new(); $config = Config::Tiny->read($config_file); my $transport = Email::Sender::Transport::SMTP::TLS->new( host => $config->{email}->{smtp_host}, port => 587, # defaults to TLS if not set username => 'bgates@microsoft.com', password => '66Fc1eb207d4380', helo => 'HELO', ); my $message = Email::Simple->create( header => [ From => 'bgates@microsoft.com', To => $to, Subject => $subject, ], body => $content, );