#!/usr/local/bin/perl use CGI; $q = new CGI; $mailaddress = "ces\@www.whyy.org"; #for testing # $mailaddress = $q->param('mailto'); print $q->redirect($q->param('thankspage')); ######################## Let's mail the data... $sendingpage = $q->param('sendingpage'); open (MAIL, "|/usr/sbin/sendmail $mailaddress") || die "Can't open sendmail!\n"; print MAIL "From: online order<$mailaddress>\n"; print MAIL "Subject: Emerging Managers Satellite Series order\n"; print MAIL "Reply-to: $mailaddress\n"; print MAIL "\n\n"; print MAIL "Hello.\n\n"; print MAIL "Someone has just submitted the form at $sendingpage\n"; print MAIL "Here's what they submitted...\n\n"; print MAIL "Do they want the series at WHYY or their workplace? "; print MAIL $q->param('where'), "\n"; print MAIL "Prefered delivery system: "; print MAIL $q->param('delivery_system'), "\n\n"; print MAIL "Name: "; print MAIL $q->param('name'), "\n"; print MAIL "Title: "; print MAIL $q->param('title'), "\n"; print MAIL "Organization: "; print MAIL $q->param('organization'), "\n"; print MAIL "Address: "; print MAIL $q->param('address'), "\n"; print MAIL "City: "; print MAIL $q->param('city'), "\n"; print MAIL "State: "; print MAIL $q->param('state'), "\n"; print MAIL "Zip: "; print MAIL $q->param('zip'), "\n"; print MAIL "Phone number: "; print MAIL $q->param('phone'), "\n"; print MAIL "Fax number: "; print MAIL $q->param('fax'), "\n"; print MAIL "Email: "; print MAIL $q->param('email'), "\n\n"; print MAIL "Total amount due: "; print MAIL $q->param('total_due'), "\n\n"; print MAIL "Payment method: "; print MAIL $q->param('payment_method'), "\n"; if ($q->param('payment_method') eq "PO") { print MAIL "Purchase order number: "; print MAIL $q->param('PO'), "\n"; } print MAIL "\n\n"; print MAIL "Credit Card type: "; print MAIL $q->param('credit_card_type'), "\n"; print MAIL "Credit Card Number: "; print MAIL $q->param('cc_number'), "\n"; print MAIL "Expiration: "; print MAIL $q->param('cc_exp'),"\n"; print MAIL "Name on Card: "; print MAIL $q->param('name_on_card'), "\n"; print MAIL "\nEnd of form\n"; close MAIL;