On 04 Dec 2002 11:48:54 +0200, [EMAIL PROTECTED] (Stelian Iancu)
wrote:
>Hello!
>
>I have this cgi script and I want to send mail to the users using the
>local installed sendmail. Can you please explain how to do it? Or please
>point me to a doc that explains this?
There are alot of nice modules to do this, but this does it
just with sendmail.
#!/usr/bin/perl -w
use strict;
my $mailprog='/usr/sbin/sendmail';
my $email = '[EMAIL PROTECTED]';
my $from = '[EMAIL PROTECTED]';
open( MAIL, "|$mailprog -t" )
|| safe_die("Can't start mail program $mailprog $!");
print MAIL "To: $email\n";
print MAIL "From: $email\n";
print MAIL "Subject: sitenews: Notification\n";
print MAIL "\n\n"; #important to print this
print MAIL "Backup completed for website.\n\n";
print MAIL "-" x 75 . "\n";
close(MAIL);
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]