Hurtigt omskrevet uden test... Prøv det
---
$|=1;
# Created by: Lars Jensen (webmaster@ljweb.com)
# (C)opyright 1998, LJ Webnologics
# Modified 10. July 2000 by: Lars Jensen (webmaster@ljweb.com)
use getformdata;
%hashRef = getData;
$subject = $hashRef{"SUBMITFORM"};
print ("Content-type: text/html\n\n");
$smtp = Net::SMTP->new("mail.domain.dk",
Hello => "
www.domain.dk",
Timeout => 30);
$smtp->mail( "mail\@domain.dk" ); # use the sender's address here
$smtp->to("modtager\@andet-domain.dk");# recipient's address
$smtp->data(); # Start the mail
$smtp->datasend("From: \"Mit navn\" <mail\@domain.dk>\n");
$smtp->datasend("To: \"modtager navn\" <modtager\@andet-domain.dk>\n");
$smtp->datasend("Subject: vi takker for deres bestilling...\n");
$smtp->datasend("\n");
#her kommer kode der skriver body delen af mailen
$smtp->datasend("Vi takker for deres henvendelse...");
foreach $item (keys (%hashRef)) {
$smtp->datasend("$item -> $content\r\n");
}
$smtp->dataend(); # slut på mailen
$smtp->quit; # mailen sendes
print '<BODY BGCOLOR="#FFFFFF">';
print '<TABLE BORDER=0 HEIGHT=95% ALIGN="center">';
print '<TR><TD ALIGN=CENTER VALIGN=MIDDLE>';
print 'Email sendt';
print '</TD></TR>';
print '</TABLE>';
print '</BODY>';
---
/ Lars
LJWeb.com