I'm just trying to send mail from a programming script NOT a real client.
For example, a monitor script calculating the disk storage and sending a
report/alert via the perl program.

I really don't want to add more library or module than necessary. So if
you guys can detect something wrong with this code let me know?

#!/usr/bin/perl

use strict;
use warnings;

my $mailprog = '/bin/mail';
my $tomail = '[EMAIL PROTECTED]';
my $inquirer = '[EMAIL PROTECTED]';

#EMAIL
open (MAIL, "|$mailprog") || die "Can't open mailprog.\n";
print MAIL "To: $tomail\n";
print MAIL "Reply-To: $inquirer\n";
print MAIL "From: $inquirer\n";
print MAIL "Subject: Inquiry Response Request\n\n";
print MAIL <<"PrintTag";
Please respond to the following inquiry:
blah blah blah, message here
PrintTag
close(MAIL);


-rkl
> Perhaps you can use sqwebmail.  It supports vpopmail authentication but
> requires Maildir format mailboxes.  Maildirs were introduced with qmail
> and have reliability advantages over the usual Mailbox files.  If you
> need to convert Mailboxes to Maildirs, see the qmail docs.  Sqwebmail is
> available from inter7, the developers of vpopmail, see
> http://www.inter7.com/sqwebmail.html.
>
> If you just need to send mail, I've found Mail::Send and Mail::Mailer
> work well for that from the command line.  You would just need to build
> a CGI forms interface to them for sending mail through a web interface.
> Basically that would require capturing the mail header and body in perl
> variables and passing them to a function or separate program that send
> the message using the Mail::Send|Mail::Mailer routines.  Each of those
> packages includes several example programs.
>
> -tristram
>
>


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to