bsBounceCheck()

Checks an email message to see if it is, indeed, a bounced message.

int bsBounceCheck (char *sMessageText, char **sEmailAddress, char *sEmailIgnoreList, char *sKey)



Parameters

sMessageText

A character array containing the RAW email message. Pass the RAW email message text in via this parameter. For formatting requirements of a RAW email message, click here.

sEmailAddress [out]

Pointer to a character array. Returns a pointer to the contents of the affected email address. If the email message that is passed into sMessageText is a bounce then this parameter will contain the email address of the bounced message.

sEmailIgnoreList

Null terminated character array containing email addresses that BounceStudio API should ignore. More than likely, this will normally include your From and Reply-To email addresses for the particular POP account you are checking email for. This list of email addresses MUST be PIPE delimited. Please see example below:

"joe@joe.com|JoeReplyBox@joe.com"
The example above is made up of 2 email addresses. joe@joe.com and JoeReplyBox@joe.com.

sEmailIgnoreList isn't used by BounceStudio API in all cases. Sometimes BounceStudio API knows that a message is a bounce, but for some reason the email address of the recipient isn't in the position that BounceStudio API is expecting it to be. When this occurs, BounceStudio API does a deeper scan of the message to find the proper recipient email address. BounceStudio API doesn't want to pass back the From or Reply-To email address of the original sender by mistake, so it checks for this before returning the sEmailAddress email address back to you.

sKey

Null terminated character array containing your unlock code. This parameter is used when you purchase the BounceStudio API. If you are demo'ing the BounceStudio API, then leave this value as an empty string.


Syntax - (ANSI C)

// ** Define some variables.
int iBounceCode;
char *sRawMessage, *sEmail;

// ** Pseudo Code. sRawMessage is the RAW message you're parsing.
// ** Usually created from the RAW POP message and/or read from file.
sRawMessage = "{RAW Email Message}";

// ** Call Function
iBounceCode = bsBounceCheck(sRawMessage, &sEmail, "", "Your License Key/123456");


Return Values

Return CodeDescription
0UNDETERMINED - (i.e. Recipient Reply)
10HARD BOUNCE - (i.e. User Unknown)
20SOFT BOUNCE - General
21SOFT BOUNCE - Dns Failure
22SOFT BOUNCE - Mailbox Full
23SOFT BOUNCE - Message Too Large
30BOUNCE - NO EMAIL ADDRESS. VERY RARE!
40GENERAL BOUNCE
50MAIL BLOCK - General
51MAIL BLOCK - Known Spammer
52MAIL BLOCK - Spam Detected
53MAIL BLOCK - Attachment Detected
54MAIL BLOCK - Relay Denied
60AUTO REPLY - (i.e. Out Of Office)
70TRANSIENT BOUNCE
80SUBSCRIBE Request
90UNSUBSCRIBE/REMOVE Request
100CHALLENGE-RESPONSE



Remarks

If all you need to do is check email messages for a bounce type, and extract the email address, then this is the only function you need.

For more examples, and language specific declarations, see sample source code files that came with BounceStudio API.