function SendMail(from,to,cc,subject,body) {
    parent.location.href='mailto:'+to+'?subject='+subject+'&from='+from+'&cc='+cc+'&body='+body+'';
}


//      print MAIL "From: $from_email\n";
// #     print MAIL "To: $email\n";
// #     print MAIL "Cc: $from_email\n";
// #     print MAIL "Subject: Confirmation of Booking $reference\n\n";
// #     print MAIL "Hello $first_name $last_name\n";
// #     print MAIL "\n";
// #     print MAIL "I wish to confirm availability for your booking arriving on\n";
// #     print MAIL "$arrival_date and departing on $departure_date for \n";
// #     print MAIL "$no_adults adults and $no_children children\n";
// #     print MAIL "\n";
// #     print MAIL "Please click on this secure link to enter your credit card information to confirm this booking\n";
// #     print MAIL "This will bring you to a secure website\n\n";
// #     print MAIL "<a href=\"https://www.dinglebandb.com/cgi-bin/DisplaySecureForm.cgi?reference=$reference&email=$email&first_name=$first_name&last_name=$last_name&arrival_date=$arrival_date&departure_date=$departure_date&no_adults=$no_adults&no_children=$no_children&phone_number=$phone_number&other_info=$other_info\">LINK</a>\n";
// #     print MAIL "Best Regards\n";
// #     print MAIL "Sean & Kathleen\n";       
// #     close(MAIL) || warn "Error closing mail: $!";


function SendConfirmationMail(from,to,cc,thereference,first_name,last_name,arrival_date,departure_date,no_adults,no_children,phone_number,other_info) {
    parent.location.href='mailto:'+to+'?subject='+'Confirmation of Reference'+thereference+'&from='+from+'&cc='+cc+'&body=Hello '+first_name+' '+last_name+'%0A%0AI wish to confirm availability for your booking arriving on %0A'+arrival_date+' and departing on '+departure_date+' for '+no_adults+' adults and '+no_children+' children.%0A%0APlease click on this secure link to enter your credit card information to confirm this booking%0AThis will bring you to a secure website%0A%0A'+

'https://www.dinglebandb.com/cgi-bin/DisplaySecureForm.cgi'+

'%0A%0aBest Regards,%0ASean and Kathleen%0a%0a'+'';
}
