sub sendpasstoemail { my $smtp; my $pingStatus; my $localcount; my $subject = "User \'$1\' Booking Request for ATCA Chassis"; my $string = <new('ORCAS01.hotmail.com'); $smtp->mail($3); $smtp->to($3); $smtp->data(); $smtp->datasend("From: Booking and Managment system\n"); $smtp->datasend("To:$3\n"); $smtp->datasend("Subject: $subject\n"); $smtp->datasend("\n"); $smtp->datasend("$string\n"); $smtp->dataend(); $smtp->quit; print $query->h2({-align=>'center'},"Your request message is sent to Chassis user"); } #### #username password email address privilege gordon gordon1234 gordon@hotmail.com admin danish danish1234 Danish@hotmail.com user johson johson1234 johson@hotmail.com user