• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: MX Record lookup
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MX Record lookup


  • Subject: Re: MX Record lookup
  • From: Robert Kuilman <email@hidden>
  • Date: Mon, 22 Sep 2003 09:30:13 +0200

Yes! it works!

You were right, i did not set the number to the max number of mx-entries i want. setting this solved my problem!
Hmm... This totally makes my day!

Thank you!

Robert K.

web: http://halfduplex.net/
email: email@hidden
------------------------------------------------------------------------ ---------------------


On Sunday, September 21, 2003, at 01:29 PM, Tomas Zahradnicky wrote:

The exact notifier code i use is below.
to me, it seems perfectly fine, but apparently it isn't because it doesnt work :)

I'd like to hear your comment on it.


The notifier looks OK. Here's a snippet which does it but in a synchronous/blocking way. You can throw it in a separate Threads Manager thread if you wish so and create a yielding notifier so it won't block. If you want so, then don't forget to call OTUseSyncIdleEvents.

You probably don't set the input parameter num to the max number of entries you want to get. Remember there may be several entries in the MX record. Not just one!

int main(void)
{
InetSvcRef ref;
OSStatus err = noErr;
UInt16 num = 1;
InetMailExchange mx = { 0, };

err = InitOpenTransportInContext(kInitOTForApplicationMask, NULL);
if( !err )
ref = OTOpenInternetServicesInContext( OTCreateConfiguration(kDNRName), kNilOptions, &err, NULL);

if( !err )
err = OTSetSynchronous( ref );

if( !err )
err = OTSetBlocking( ref );

if( !err )
err = OTInetMailExchange( ref, "apple.com", &num, &mx );

return 0;
}


-Tomas
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: MX Record lookup (From: Tomas Zahradnicky <email@hidden>)

  • Prev by Date: Re: Determining if the current network location is "Automatic"
  • Next by Date: Re: How can I tell if DHCP is active
  • Previous by thread: Re: MX Record lookup
  • Next by thread: Re: MX Record lookup [additional]
  • Index(es):
    • Date
    • Thread