use Net::SMTP; my $server = 'smtp.strato.de'; # oder 127.0.0.1 versuchen! my $smtp = Net::SMTP->new( $server, #Debug => 1, ); my $to = 'spam@example.de'; my $from = 'fromadresse@example.de'; my $subject = 'Senden ueber Net::SMTP'; my $body = <auth( "USERNAME"," PASSWORD"); #$smtp->mail($ENV{USER}); # falls lokal geht $smtp->mail($from); $smtp->to($to); $smtp->data(); $smtp->datasend("To: $to\n"); $smtp->datasend("From: $from\n"); $smtp->datasend("Subject: $subject\n"); $smtp->datasend("\n"); $smtp->datasend($body); $smtp->dataend(); $smtp->quit();