I have my db set up where the person sending the record only gets 2 boxes...their name and their friends email address. The subject is hidden and so is the message. This is what I have in my db.cgi send_email sub:
chomp($message);
&html_forward_email_form($message);
return;
}
open (MAIL, "$mailprog") || &cgierr("unable to open mail program");
print MAIL "To: $in{'to_email'}\n";
print MAIL "From: $admin_email\n";
print MAIL "Subject: $in{'subject'}\n\n";
print MAIL "Your friend $in{'friend'} found this listing at StayFlorida.com\n";
print MAIL "and thought you might be interested.\n";
print MAIL "\n";
print MAIL "You can view this listing here:\n";
print MAIL "http://www.wdu.net/cgi-local/dbman/db.cgi?db=default&uid=default&view_records=1&ID=$in{'ID'}&ww=1\n";
print MAIL "\n";
print MAIL "Please send $in{'friend'} our thanks to for referring you.\n";
print MAIL "\n";
print MAIL "Sincerely;\n";
print MAIL "\n";
close (MAIL);
&html_forward_email_success;
}
then in my html_send_email sub, I have the subject field and the email message field hidden from all but admin. Works fine for me.
Code:
if ($message) { chomp($message);
&html_forward_email_form($message);
return;
}
open (MAIL, "$mailprog") || &cgierr("unable to open mail program");
print MAIL "To: $in{'to_email'}\n";
print MAIL "From: $admin_email\n";
print MAIL "Subject: $in{'subject'}\n\n";
print MAIL "Your friend $in{'friend'} found this listing at StayFlorida.com\n";
print MAIL "and thought you might be interested.\n";
print MAIL "\n";
print MAIL "You can view this listing here:\n";
print MAIL "http://www.wdu.net/cgi-local/dbman/db.cgi?db=default&uid=default&view_records=1&ID=$in{'ID'}&ww=1\n";
print MAIL "\n";
print MAIL "Please send $in{'friend'} our thanks to for referring you.\n";
print MAIL "\n";
print MAIL "Sincerely;\n";
print MAIL "\n";
close (MAIL);
&html_forward_email_success;
}
then in my html_send_email sub, I have the subject field and the email message field hidden from all but admin. Works fine for me.