Response Event

Fired for each MailServer accepting email for the domain.

Syntax

ANSI (Cross Platform)
virtual int FireResponse(MXResponseEventParams *e);
typedef struct {
int RequestId;
const char *Domain;
const char *MailServer;
int Precedence;
int TimeToLive;
int StatusCode;
const char *Description;
int Authoritative; int reserved; } MXResponseEventParams; Unicode (Windows) virtual INT FireResponse(MXResponseEventParams *e);
typedef struct {
INT RequestId;
LPCWSTR Domain;
LPCWSTR MailServer;
INT Precedence;
INT TimeToLive;
INT StatusCode;
LPCWSTR Description;
BOOL Authoritative; INT reserved; } MXResponseEventParams;
- (void)onResponse:(int)requestId :(NSString*)domain :(NSString*)mailServer :(int)precedence :(int)timeToLive :(int)statusCode :(NSString*)description :(BOOL)authoritative;
#define EID_MX_RESPONSE 2

virtual INT IPWORKS_CALL FireResponse(INT &iRequestId, LPSTR &lpszDomain, LPSTR &lpszMailServer, INT &iPrecedence, INT &iTimeToLive, INT &iStatusCode, LPSTR &lpszDescription, BOOL &bAuthoritative);

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:

StatusCodeDescription
0Ok
1Format error
2Server failure
3Name error
4Not implemented
5Refused

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.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks 2020 C++ Edition - Version 20.0 [Build 8307]