Mwnci lookupmx() Function

Syntax

lookupmx(string)

Description

The lookupmx() function returns the DNS MX records for the given domain name sorted by preference.

The returned mail server names are validated to be properly formatted presentation-format domain names. If the response contains invalid names, those records are filtered out.

If no records are found, an empty array is returned

Example

println(lookupmx("google.co.uk"))
println(lookupmx("google.co.yewkay"))


["smtp.google.com. 0"]
[]