rbala has asked for the wisdom of the Perl Monks concerning the following question:
it returned me the following errors:#! /usr/bin/perl -w sub sendemail { my ($to, $from, $subject, $message) = @_; my $sendmail = '/usr/lib/sendmail'; open(MAIL, "|$sendmail -oi -t"); print MAIL "From: $from\n"; print MAIL "To: $to\n"; print MAIL "Subject: $subject\n\n"; print MAIL "$message\n"; close(MAIL); } &sendemail("myemail@gmail.com", "myemail@yahoo.com", "Test perl mail", + "This is the test mail from perl");
Name "main::gmail" used only once: possible typo at ./mail.pl line 15.
Name "main::yahoo" used only once: possible typo at ./mail.pl line 15.
Pls help me... Thanks in advance !!!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Send e-mail using perl
by zentara (Cardinal) on Aug 07, 2012 at 07:55 UTC | |
by rbala (Acolyte) on Aug 07, 2012 at 08:10 UTC | |
by Corion (Patriarch) on Aug 07, 2012 at 08:17 UTC | |
by rbala (Acolyte) on Aug 07, 2012 at 08:28 UTC | |
by marto (Cardinal) on Aug 07, 2012 at 08:36 UTC | |
by Anonymous Monk on Aug 07, 2012 at 08:34 UTC | |
by zentara (Cardinal) on Aug 07, 2012 at 14:34 UTC | |
|
Re: Send e-mail using perl
by Jenda (Abbot) on Aug 07, 2012 at 08:19 UTC | |
by flexvault (Monsignor) on Aug 07, 2012 at 14:18 UTC | |
by Anonymous Monk on Aug 07, 2012 at 14:53 UTC | |
by Jenda (Abbot) on Aug 07, 2012 at 22:56 UTC | |
by flexvault (Monsignor) on Aug 07, 2012 at 17:21 UTC | |
|
Re: Send e-mail using perl
by aitap (Curate) on Aug 07, 2012 at 08:28 UTC | |
by rbala (Acolyte) on Aug 07, 2012 at 09:42 UTC | |
by marto (Cardinal) on Aug 07, 2012 at 09:44 UTC | |
by aitap (Curate) on Aug 07, 2012 at 09:50 UTC | |
by marto (Cardinal) on Aug 07, 2012 at 09:58 UTC | |
|
Re: Send e-mail using perl
by roho (Bishop) on Aug 07, 2012 at 12:53 UTC | |
by rbala (Acolyte) on Aug 08, 2012 at 07:18 UTC | |
|
Re: Send e-mail using perl
by Anonymous Monk on Aug 07, 2012 at 07:59 UTC | |
by BillKSmith (Monsignor) on Aug 07, 2012 at 13:32 UTC |