DNS lookup for MX record

Thanks, but how do I implement this in Clarion?
I’ve found the following but it’s a bit hard to follow: