3k Associates Logo
About 3k Associates
What's New?
Vendor/Product Info
Job Listings
Public Domain Software

3kassociates.com Web

Site Map

Sending E-mail using Command Files or Programmatic Calls

netmaillogo.gif (3328 bytes)Using Command Files:

NetMail/3000 is designed with a "batch" style interface - to be accessed from batch jobs or via command files invoked in the background. The interface is designed to easily accommodate custom applications, and to get you started, we provide a couple sample command files (you'll find them in the XEQ.THREEK group on your system if you already have the software installed).

A simple example; want to e-mail spoolfile #o6702 to someone?

:SENDHTML.XEQ.THREEK user@acme.com,,,6702,"Here's a sample report"

It even converts the spoolfile to an "HTML" file, ensuring that columns line up and long lines don't wrap around (mail users with GUI mail clients will REALLY appreciate that!)

Another simple example just e-mails a specified file to someone;

:SENDFILE.XEQ.THREEK someone@hp.com,,,myfile.data,"Here's that database extract you wanted!"

Both easily invoked in any job stream or programmatically by calling the "COMMAND" or "HPCICOMMAND" Intrinsics.

API/3000 LogoUsing the API in your own Programs:

On the other hand; if you want to take real control of e-mail within your application, with a few simple calls in your source code, your program can send a message(s), retrieve messages from a mailbox, or lookup names in the mail directory.

The API we provide implements an industry standard for e-mail APIs called "CMC" (Common Messaging Calls). This API was designed by the Unix world as a basic (but extensible) interface to allow a program to interface with an e-mail transport system. The specification was extensible enough that Microsoft used it as a basis for the MAPI standard (adding some windows specific options); so applications developed to call API/3000 could also potentially be easily ported to other platforms.

The API provides several basic functions; these include:

  • The ability to submit a message to the mail transport for delivery
  • The ability to access a "mailbox" and retrieve (and delete) messages from that mailbox
  • The ability to interrogate the mail server's directory (look for addresses)

Sample code is provided; complete examples you can compile and modify - in C, COBOL, and SPLash!

Give us a call at +1 703-569-9189 and we'd be happy to send you a free demo; or feel free to pick up a complete demo (with manuals in PCL and Adobe PDF format) right off our web page!

Back to 3k Associates' home page.