
Vielen Dank für Deine Hilfe!
Code: Alles auswählen
sub mail {
$smtp = Net::SMTP->new(\'here.com\'); # connect to an SMTP server here.com gegen richtigen Servernamen tauschen falls notwendig
$smtp->mail( $Recipient ); # use the sender\'s address here
$smtp->to($_[0]); # recipient\'s address
$smtp->data(); # Start the mail
# Send the header.
$smtp->datasend("Subject: ".$_[1]."\\n");
$smtp->datasend("To: ".$_[0]."\\n");
$smtp->datasend("From: ".$Recipient."\\n");
$smtp->datasend("\\n");
# Send the body.
$smtp->datasend($_[2]);
$smtp->dataend(); # Finish sending the mail
$smtp->quit; # Close the SMTP connection
}