alienhuman has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks,
I've used Mail::Mailer a bit with great success, but there's one thing that irks me about it. Creating a new mailer thus (from the docs):
$mailer = new Mail::Mailer 'smtp', Server => $server;
Means that I always have to hardcode a value for $server in my script. Not portable!
My question:
Is there a default value for server, possibly in an environment variable somewhere, that I can rely on to fill $server on its own (assuming the machine is properly configured)?
I'm running SunOS 5.7, but expect to be moving to other *nix OSes soon, fyi.
Thanks,
Chris
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Mail::Mailer and default value of $server?
by footpad (Abbot) on Jan 10, 2002 at 21:26 UTC | |
|
Re: Mail::Mailer and default value of $server?
by vek (Prior) on Jan 10, 2002 at 21:21 UTC | |
by alienhuman (Pilgrim) on Jan 10, 2002 at 21:23 UTC | |
|
Re: Mail::Mailer and default value of $server?
by KILNA (Acolyte) on Jan 11, 2002 at 01:27 UTC | |
|
Re: Mail::Mailer and default value of $server?
by Rich36 (Chaplain) on Jan 10, 2002 at 22:18 UTC |