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

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



At 09.05 -0500 1999.04.01, Paul J. Schinder wrote:
>} >use Mac::InternetConfig;
>} >print $InternetConfig{kICSMTPHost};
>}
>} If it's that easy, it should be integrated into Net::DNS. Even if it
>}doesn't work on all Macs, it doesn't cost a lot to try...
>
>It's not that easy.  That little snippet does not work for me, and I
>certainly have Internet Config, with a setting for the SMTP server.  It
>comes built into the latest versions of MacOS, including the one I'm using.
>It may be that Mac::InternetConfig can't deal with the new Internet Config
>(it changed even before being incorporated into the OS, the one that ships
>with MacPerl is old).

It should work, with the caveat that because kICSMTPHost is not an inlined
sub, you need to put the parens after it (I have it on my TODO list to make
sure it is inlined in the next release of MacPerl).  The IC API is
basically unchanged, so this code should work with the Mac OS 8.5 Internet
Control Panel and Internet Preferences (after you add the parens).

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

Works for me, and I don't have the "real" Internet Config installed under
Mac OS 8.5.

--
Chris Nandor          mailto:pudge@pobox.com         http://pudge.net/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10  1FF77F13 8180B6B6'])

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