I understand what you are saying but I would have to include the path, the @INC thing, to the "use WhateverTheHeckICallTheModule qw(emailx);".
This would affect command line and mod_perl. If I put the WhateverTheHeckICallTheModule in the current dir, it works fine for the command line. For mod_perl, I would need to put it in a startup script or something which I have read but not sure how to do it. I just rather not bother at this time unless you can give me an example of how to add the path to @INC and do I need to define the @INC in each file? Also, if you know how to include it for the mod_perl. thanks, -rkl >> Thanks, you did good with this code for me. I did not want to >> load more library as most suggested. This works just fine > > Why not? One simple use statement and you're done. Platform independent, > No relying on an external program to be at the path you specify, use the > switches you specify, > Or use the data in the format you specify. > > I love Mail::Sender and I'm actually in the middle of a module that > simplifies even using that (if you can imagine), > > Once done it will look like this: > > > #/usr/bin/perl > use strict; > use warnings; > use WhateverTheHeckICallTheModule qw(emailx); > > emailx({ > ip => '1.2.3.4', > to => '[EMAIL PROTECTED]', > fr => '[EMAIL PROTECTED]', > sb => 'Inquiry Response Request', > ms => $emailmessagehere > }) or die "No sendy mial $Error"; > > You can even make it html and add attachment inline or attached with one > simple hash entry. > ht => $htmlversionhere, > at => ... > Much easier to read and you can use it on any server. There's even a > way to ammke the smtp ip address automaytic so you don'tr have to put > a different one in each script, via the Mail::Sender default data. > > > For those interested kepp watching here: > http://search.cpan.org/~dmuey/ > > HTH > > DMuey > >> with only one exception. I needed to use the -t option. Here >> is the revised version which worked for >> me: >> >> #/usr/bin/perl >> use strict; >> use warnings; >> >> my $mailprog = '/usr/sbin/sendmail -t' >> my $empemail='[EMAIL PROTECTED]'; >> my $inquirer='[EMAIL PROTECTED]'; >> >> #EMAIL >> open (MAIL, "|$mailprog") || die "Can't open mailprog.\n"; >> print MAIL "To: $empemail\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); >> >> --end code-- >> >> > $mailprog = '/your/sendmail/path' >> > >> > #EMAIL >> > open (MAIL, "|$mailprog") || die "Can't open mailprog.\n"; >> print MAIL >> > "To: $empemail\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); >> > >> > >> > At 07:14 PM 10/3/2003, you wrote: >> >>I need to send a mail from the cgi. It must be able to have >> a reply or >> >>sender as someone different from the local web owner (apache). My >> >>configuration: >> >> redhat 9/qmail/vpopmail >> >> >> >> The example below will be typically what I want: >> >> >> >>To: [EMAIL PROTECTED] >> >>From: [EMAIL PROTECTED] >> >>Subject: "hello support test" >> >>this is a test >> >>with all your support >> >> >> >>I see alot of parts but can't get it working. >> >>can someone put a little script together that does this? >> >> >> >>thanks, >> >>-rkl >> >> >> >>-- >> >>To unsubscribe, e-mail: [EMAIL PROTECTED] >> >>For additional commands, e-mail: [EMAIL PROTECTED] >> > >> > >> > >> >> >> -- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > ----------------------------------------- eMail solutions by http://www.swanmail.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]