kiat has asked for the wisdom of the Perl Monks concerning the following question:
I've a hosting account with pair and I don't seem to have any luck using Mail::Sendmail via a web form.
I'm totally lost here. Apparently, Mail::Sendmail is installed on their server but it just won't work.use Mail::Sendmail; sub notify { my ($recipient, $message) = @_; my %mail = ( To => $recipient, From => 'me@hey.com', Message => $message ); sendmail(%mail) or die $Mail::Sendmail::error; }
I've a similar piece of code which I use for local testing. That one works:
Could someone help shed some light on what I'm missing?use Mail::Sendmail; unshift @{$Mail::Sendmail::mailcfg{'smtp'}} ,'smtp.someserver.com'; sub notify { my ($recipient, $message) = @_; %mail = ( To => $recipient, From => 'me@here.com', Message => $message ); sendmail(%mail) or die $Mail::Sendmail::error; }
Thanks in advance :)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Mail::Sendmail help
by matija (Priest) on Feb 22, 2004 at 16:22 UTC | |
|
Re: Mail::Sendmail help
by PodMaster (Abbot) on Feb 22, 2004 at 12:14 UTC | |
by kiat (Vicar) on Feb 22, 2004 at 12:30 UTC |