[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cobalt-users] [raq4] using Sendmail and Perl
- Subject: [cobalt-users] [raq4] using Sendmail and Perl
- From: Rusty Wilson <rustyw007@xxxxxxxxx>
- Date: Fri Oct 5 08:50:40 2001
- List-id: Mailing list for users to share thoughts on Cobalt products. <cobalt-users.list.cobalt.com>
Hi all,
Please accept my apologies for the slightly OT post -
but I have been watching the list, and it is apparent
there are some perl experts in here. (Side question -
anyone have a good perl list I can submit this
question to? All the ones I have tried are completely
inactive, and not much help).
System: RaQ 4i - Perl 5.00503
The following code works *IF* the user enters a
properly consturcted email address on the form. If
not, then I get an HTTP 500 - internal server error.
I know the best answer is to do a check on the email
entry BEFORE the form is submitted; however, I would
rather just have the script keep processing even if
the email format is not correct. Ideas?
Email addresses and company name changed for security
reasons...
$email is the variable from the form being submitted.
<CODE SNIPPET>
sub send_email_confirmation() {
open (MAIL,"|/usr/lib/sendmail -t") ||
&error("Can't open sendmail...\n");
print MAIL "To: $email\n";
print MAIL "Bcc:
zzzz\@zzz.com,rustyw007\@yahoo.com\n";
print MAIL "From: zzz Corporation\n";
print MAIL "Subject: Auto-Reply from zzz
Corporation\n\n";
print MAIL "This message is designed to let you know
that the form\n";
print MAIL "you completed at zzz.com has been
successfully\n";
print MAIL "submitted. If you requested information,
it will be\n";
print MAIL "delivered to you soon.\n\n";
Thanks!
__________________________________________________
Do You Yahoo!?
NEW from Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1