[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Find SMTP server(s): nslookup?



>From: Milivoj Ivkovic <mi@alma.ch>
>To: macperl@macperl.org
>Subject: [MacPerl] Find SMTP server(s): nslookup?
>Date: Wed, Mar 31, 1999, 6:34 AM
>

> Now that I have the hostname, I can go on to the real purpose of this: try
> to find an SMTP server nearby.
>
> Of course, I'll check Net::Config and try to connect to localhost on port
> 25. But what else can I do?
>
> Does Net::DNS work on Macs? (It doesn't on Win95).
haven't tried it
>
> Would some Macs have environment variables like $ENV{MAILHOST} set?
doubt it
>
> And of course, I would like to find the MX records for the local domain.
> WinNT and Linux are easy: `nslookup ....`. What about Macs? Would it have
> implemented `nslookup` as with `hostname`?
>
> Or would some Macs have such a command (I read something about Unix tools
> in a new Mac OS)?
the way I get the address of the SMTP hostname is this (it uses
InternetConfig, which has come bundled with the Mac OS since Mac OS 7.6):

use Mac::InternetConfig;
print $InternetConfig{kICSMTPHost};

If you want to send e-mail, then you can just use Net::SMTP, which is in
libnet. It automatically gets the data from InternetConfig, including SMTP
host, SMTP username, SMTP password, and others.
>
>
>
> ===== Want to unsubscribe from this list?
> ===== Send mail with body "unsubscribe" to macperl-request@macperl.org
>
> 

===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org