Search notes:

Perl module Net::SMTP

use warnings;
use strict;

use Net::SMTP;

my $to_email_addr      = shift; # 'rene.nyffenegger@adp-gmbh.ch';
my $from_email_addr    = shift; # 'no.replay@bla.ch';
my $mailserver         = shift; # 'mail.adp-gmbh.ch';

my $smtp = Net::SMTP->new($mailserver, Timeout => 2, hello=>$mailserver) or die;

$smtp->mail($from_email_addr);

$smtp->recipient($to_email_addr);

$smtp->data ();

$smtp->datasend("From: $from_email_addr\n");
$smtp->datasend("Subject: Test\n");
$smtp->datasend("To: $to_email_addr\n");

$smtp->datasend("\n");

$smtp->datasend("first line\nsecond line\n");

$smtp->dataend();

$smtp->quit();
Github repository PerlModules, path: /Net/SMTP/script.pl

See also

SMTP
Perl modules

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1758206648, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/languages/Perl/modules/Net/SMTP/index(68): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78