Response Event
Fired for each MailServer accepting email for the domain.
Syntax
mx.on('Response', [callback])
Callback
The 'callback' is called when the 'Response' event is emited.
function(e){ }
The argument 'e' has the following properties:
e.requestId e.domain e.mailServer e.precedence e.timeToLive e.statusCode e.description e.authoritative
Remarks
A Response event is fired for each mail server handling email for the requested domain. The RequestId parameter identifies the request and equals the value of RequestId property right before the Resolve method is called. MailServer is the name of the server handling email for the requested Domain. A lower Precedence value should be preferred. The TimeToLive parameter gives the validity time in seconds before the DNSServer should be queried again.
Possible values for the StatusCode and Description parameters are:
StatusCode | Description |
0 | Ok |
1 | Format error |
2 | Server failure |
3 | Name error |
4 | Not implemented |
5 | Refused |
After the last Response event is fired, the class sets the MailServer and Status properties to the best MailServer and the error or success code respectively.