Bitspan provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Bitspan support professionals can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs. If you have limited programming experience, you may want to contact a Bitspan Certified Partner or the Bitspan fee-based consulting line at (604) 926-3242. For more information about Bitspan Certified Partners, please visit the following Bitspan Web site:
http://www.bitspan.com/partner/referral/
For more information about the support options that are available and about how to contact Bitspan, visit the following Bitspan Web site:
Automation (formerly OLE Automation) allows one program to control another program by either issuing commands or retrieving information programmatically. You can use the code examples in this article in Microsoft Word 97, Microsoft Excel 97, Microsoft Visual Basic, or any other program that supports Automation.
The Bitspan FESTä Agent Object Model
Check to see if an email is spam or not:
#include "stdafx.h"
#import "C:\BSProcessor.exe" no_namespace
int main()
{
_bstr_t strEmail = "actual body of email to be checked";
_bstr_t strTo = "email address(s) to which it was sent";
_bstr_t strCC = "email address(s) to which it was carbon copied";
long DefID = 0;
long mySD = 5;
_variant_t result = 1;
_SpamProcessorPtr ptr;
CoInitialize(NULL);
ptr.CreateInstance(__uuidof(SpamProcessor));
result = ptr->isSPAM(strEmail,strTo,strCC,mySD,&DefID);
CoUninitialize();
return 0;
}
For more information about creating solutions with Bitspan FESTä, please see the following articles in the Bitspan Knowledge Base:
100001 How to Automated Bitspan FEST™ from
Visual Basic
100003 How to Automated Bitspan FEST™ from
SOAP/HTTP
|
Last Reviewed: |
4/04/2004 (1.0) |
|
Keywords: |
kbdtacode kbhowto kbProgramming kbusage KB100002 |