SMTP/POP3 Email Engine
Library for C/C++


Programmer's Manual


(SEE4C)


Version 3.2

January 10, 2000



This software is provided as-is.
There are no warranties, expressed or implied.



Copyright (C) 2000
All rights reserved



MarshallSoft Computing, Inc.
Post Office Box 4543
Huntsville AL 35815



Voice : 256-881-4630

FAX : 256-880-0925

email : info@marshallsoft.com

web : www.marshallsoft.com



MarshallSoft is a member of the Association of Shareware Professionals

MARSHALLSOFT is a registered trademark of MarshallSoft Computing.



TABLE OF CONTENTS


1 Introduction
1.1 Documentation Set
1.2 Example Program
1.3 Installation
1.4 Uninstalling
1.5 Ordering
1.6 Updates
2 Compiler Issues
2.1 Command Line Tool Setup
2.1.1 Microsoft
2.1.2 Borland
2.1.3 Watcom
2.1.4 Lcc-Win32
2.2 Command Line Batch Files
2.3 Command Line Makefiles
2.4 Compiling Using an IDE
3 Supported Compilers
3.1 Microsoft C/C++
3.2 Microsoft Visual C/C++
3.3 Borland C/C++
3.4 Turbo C/C++ for Windows
3.5 Borland C++ Builder
3.6 Watcom C/C++
3.7 Lcc-Win32 C/C++
4 Compiling Example Programs
4.1 Static Libraries
4.2 Editing EMAIL.H
4.3 Your Key Code
5 Example Programs
5.1 SMTP Example Programs
5.2 POP3 Example Programs
6 Revision History

1 Introduction

SEE4C is the easiest way to write email applications in C/C++ !

The SMTP/POP3 Email Engine (SEE) is a library of functions providing direct and simple control of the SMTP (Simple Mail Transport Protocol) and POP3 (Post Office 3) protocols.

A simple interface allows sending and receiving email, including multiple MIME base64 and quoted- printable encoded attachments. Knowledge of Winsock and TCP/IP is not needed. SEE4C includes multiple C/C++ example programs.

With SEE4C, you can write GUI or console mode programs that easily:

  1. Send email with optional MIME attachments.
  2. Get the number of messages on your email server.
  3. Get the header lines from any email on your server, without reading the entire email.
  4. Delete any email on the server without reading it first.
  5. Receive any email on your server including MIME attachments.
  6. Run up to 128 independent WIN32 threads concurrently.

Seventeen example programs are included, demonstrating SMTP and POP3 functions. Microsoft Foundation Class (MFC) and Borland C++ Builder (BCB) examples are also included.

SEE4C supports and has been tested with Microsoft C/C++, Microsoft Visual C/C++, Borland C/C++, Turbo C/C++ for Windows, Borland C++ Builder, Watcom C/C++, and Lcc-Win32 compilers. It can also be used with most other C/C++ Windows compilers.

Both Win16 and Win32 DLLs (Dynamic Link Libraries) are provided. SEE4C can be used with Windows 3.X, 95/98, and NT. The SEE4C DLLs (SEE16.DLL and SEE32.DLL) can also be used from any language (Visual Basic, Delphi, etc.) capable of calling the Windows API.

When comparing SEE against our competition, note that:

  1. SEE4C is a standard Windows DLL (NOT an OCX or ActiveX control) and is much smaller than a comparable OCX or ActiveX control.
  2. Both WIN16 and WIN32 DLLs are included.
  3. SEE4C does NOT depend on ActiveX or Microsoft Foundation Class (MFC) libraries or similar "support" libraries.
  4. The WIN32 version of SEE is fully threadable.
  5. The SEE4C functions can be called from applications not capable of using controls.

1.1 Documentation Set

The complete set of documentation consists of three manuals in three formats. This is the first manual (SEE4C) in the set.

Each manual comes in three formats:

1.2 Example Program

The following example demonstrates the use of some of the library functions:

 #include <windows.h>
 #include <stdio.h>
 #include "see.h"
 void main(int argc, char *argv[])
 {int Code;
  /* attach SEE */
  Code = seeAttach(1, 0);            /* keycode is 0 */
  if(Code<0)
    {printf(“Cannot attach SEE\n”);
     exit(1);
    }
  /* connect to SMTP server */
  Code = seeSmtpConnect(
    0,                               /* channel 0 */
    (LPSTR)"mail.yourserver.net",    /* your SMTP server */
    (LPSTR)"<user@domain.com>",      /* your email address */
    (LPSTR)NULL);  /* Reply-To header */
  if(Code<0)
    {printf(“Connect failed\n”);
     seeRelease();
     exit(1);
    }
  /* send email */
  Code = seeSendEmail(
    0,                               /* channel 0 */
    (LPSTR)"<see@marshallsoft.com>", /* To list */
    (LPSTR)NULL,                     /* CC list */
    (LPSTR)NULL,                     /* BCC list */
    (LPSTR)"SEE Test",               /* Subject */
    (LPSTR)"This is a test.",        /* Message text */
    (LPSTR)"SEE4C31.ZIP");           /* MIME attachment */
          if(Code<0) printf(“email NOT sent\n”);
  /* close connection to server */
  seeClose(0)
  seeRelease();
 }
In the example program above, seeAttach is called to initialize SEE and then seeSmtpConnect is called to connect to the SMTP mail host. The SMTP server host name and your email address are required, while the "Reply-To" entry is optional. seeSendEmail is then called, passing the addressee lists. The primary addressee is provided in the "To List". The CC ("Carbon Copy") lists additional recipients, as does the BCC (Blind Carbon Copy) list. The subject contains the email subject line. The message text is next. If it starts with the '@' symbol, it is considered the name of the file containing the email message. Lastly, the filename of any ASCII or binary attachment is specified. All fields in seeSendEmail are optional except the first. After returning from seeSendEmail, the seeClose function is called to close the connection to the SMTP server. Lastly, seeRelease is called to perform SEE termination processing and release the Winsock.

1.3 Installation

  1. Before installation of SEE4C, your Windows C/C++ compiler should already be installed on your system and tested. In particular, include command line tools when installing your compiler if you want to compile using command line makefiles. If you need help with makefiles, see MAKEFILE.TXT.

  2. Create your project directory, copy the zip-file, then unzip.

  3. Running the INSTALL program.

The INSTALL batch file must be run to copy the proper DLL's for your compiler. All recent WIN32 C/C++ compilers support the "declspec" keyword. Microsoft VC (version 4.0 and up), Borland (version 5.0 and up), Watcom (version 11.0 and up), and Lcc-Win32 compilers support the "declspec" keyword.

If you have an older Win32 compiler, you can choose to install native mode DLLs. Run the INSTALL installation program, which will copy the proper LIB's and DLL's.

INSTALLU : For Win32 compilers supporting "declspec".

INSTALLM : For native mode Microsoft.

INSTALLB : For native mode Borland.

INSTALLW : For native mode Watcom.

INSTALL1 : For Win16 compilers only.

Choose INSTALLU for Microsoft Visual C/C++, Borland C/C++ 5.0 and later, Borland C++ Builder, Watcom C/C++ version 11.0 and later, and Lcc-Win32.

1.4 Uninstalling

Uninstalling SEE4C is very easy. SEE does NOT modify the registry. First, delete the SEE project directory created when installing SEE4C. Second, delete SEE16.DLL and SEE32.DLL from your Windows directory, typically C:\WINDOWS for Windows 3.1/95/98 or C:\WINNT for Windows NT. That's it!

1.5 Ordering

See Section 1.5 of the SEE User’s Manual (SEE_USR) for details on ordering.

1.6 Updates

When you register SEE4C you will receive a set of registered DLLs plus a license file (SEExxxx.LIC) that can be used to update your registered DLL’s for a period of one year from purchase. Updates can be downloaded from

www.marshallsoft.com/oem.htm

After one year, licenses can be updated for $30 for email delivery.


2 Compiler Issues

In order to compile from the command line, command line compiler tools must be set up properly.

2.1 Command Line Tool Setup

For all compilers, your path should point to the compiler BIN directory. For example, to add "C:\BC50\BIN" to your existing path, use

PATH C:\BC50\BIN;%PATH%

2.1.1 Microsoft

Set LIB and INCLUDE environment variables. For example,

SET INCLUDE=C:\MSVC\INCLUDE
SET LIB=C:\MSVC\LIB

2.1.2 Borland

Check that TURBOC.CFG, BCC32.CFG, TLINK.CFG, and TLINK32.CFG all have the correct information in them, as they should have when your compiler was installed.

Set the INCLUDE environment variables. For example,

SET INCLUDE=C:\BC50\INCLUDE

BRCC doesn't use any *.CFG files, but will use INCLUDE if set as above.

If "SET LIB=" is used, it must point to Borland’s LIB directory. Assuming that TURBOC.CFG is correct, it is best to clear the LIB environment variable with

SET LIB=

2.1.3 Watcom

Set the WATCOM environment variables to point to your compilers include (H) and BIN directories. For example,

SET INCLUDE=C:\WC11\H;C:\WC11\H\NT
SET WATCOM=C:\WC11
SET EDPATH=C:\WC11\EDDAT
SET WWINHELP=E:\BINW

2.1.4 Lcc-Win32

The LCC environment variables are set like the others. For example,

SET INCLUDE=C:\LCC\INCLUDE
SET LIB=C:\LCC\LIB


2.2 Command Line Batch Files

If your compiler installation includes command line tools, then all of the example programs can be compiled directly from the command line. These same compiler commands can also be placed in a batch file.

See MAILER32.BAT for an example of a console mode command line batch file and FROM32.BAT for an example of a GUI mode command line batch file. Similarly, command line batch files can be created for all of the example programs.

2.3 Command Line Makefiles

Command line makefiles originated on UNIX systems. They are the standard way that C/C++ programs are constructed in command line environments. The advantage of makefiles (as compared to an integrated development environment) is that all compiler switches are coded within the makefile and the makefile can be run with a single keystroke.

Makefiles are provided for Microsoft, Borland, and WATCOM command line compilers.

2.4 Compiling Using an IDE

All current windows compilers have an "Integrated Development Environment" (IDE) for building application programs in the Windows environment. Since there is no standard format for IDE project files, file names must be entered into the IDE from the keyboard.

Note that not only do IDE's vary between the different compiler manufacturers, but they also vary from version to version for the same compiler.

Creating a project makefile for the examples that have only command line makefiles is fairly straight forward. All of the IDE's use the concept of a file hierarchy. For example, the STAT example program file hierarchy in the IDE (for 32-bit) should look like:

STAT.EXE

+++ STAT.C
+++ SEE32.LIB

Replace SEE32.LIB above with SEE16.LIB for 16-bit applications, with SEE32BCB.LIB if using Borland C++ Builder, and with SEE32LCC.LIB if using Lcc-Win32.

The order of the files is not significant. Also refer to the sections on individual IDE's that follow this section.

3.0 Supported Compilers

SEE4C has been tested with Microsoft C/C++, Microsoft Visual C/C++, Borland C/C++ , Borland C++ Builder, Borland Turbo C/C++, Watcom C/C++, and Lcc-Win32. Other Windows C/C++ compilers may work as well.

3.1 Microsoft C/C++

Note: See the next section for Microsoft Visual C/C++.

Microsoft C/C++ programs can be compiled from either the command line or from within the Microsoft development environment.

The last Win16 Microsoft compiler is version 1.52. Install with “INSTALL 16” in order to compile Win16 applications. For version of Microsoft C/C++ preceding Microsoft Visual C/C++, install with "INSTALL M".

3.1.1 Microsoft Command Line Makefiles

All Microsoft Win16 makefiles end with “16._m_”. Note that many of the example program are console mode programs, and cannot be compiled as Win16 programs since Win16 does not support console mode. To compile, use the Microsoft NMAKE utility:

NMAKE -f FROM16._M_
NMAKE -f QUICK16._M_
NMAKE -f REGME16._M_

SEE can be used with Microsoft Foundation Class (MFC) programs. Use the MFCPGM16.MAK makefile to compile the MFC_PGM example program.

NMAKE -f MFCPGM16.MAK

3.1.2 Microsoft IDE

To create a new project, choose "Project", then "New". Select Win16 [or Win32] as the target. A dialog box will then pop up into which the project file names are entered.

3.2 Microsoft Visual C/C++

Microsoft Visual C/C++ programs can be compiled from either the command line or from within the Microsoft development environment. All MSVC programs are Win32 only.

In order to use SEE with MSVC, install using “INSTALL U”.

3.2.1 Microsoft Command Line Makefiles

Programs can be compiled using command line makefiles. All Microsoft Win16 command line makefiles end with “16._m_” while Win32 command line makefiles end with ’32._m_”. To compile using a makefile, use the Microsoft NMAKE utility. For example,

NMAKE -f QUICK16._M_
NMAKE -f QUICK32._M_

SEE can be used with Microsoft Foundation Class (MFC) programs. Use the MFCPGM32.MAK makefile to compile the MFC_PGM example program.

NMAKE -f MFCPGM32.MAK

3.2.2 Microsoft Developer Studio

To open an existing project, choose "File", then "Open Workspace", and then select "Makefiles" from the list of file types. Several of the example programs have Microsoft Visual Studio C/C++ makefiles, ending with ".MAK" , such as

stat32.mak
from32.mak
seever32.mak
quick32.mak

To create a new project in MSVC 4.0, choose "File", then "New", then "Project Workspace". Select "Application" or "Console Application" for "Type:" and your project name for "Name:". Choose Win32 for platform. Then select "Create". Select "Insert", then "Files into Project". Add all filenames including any resource file (.RC) and SEE32.LIB. Lastly, select "Build", then "Rebuild All".

To create a new project in MSVC 5.0, choose "File", then "New", then "Win32 Application" or "Win32 Console Application " and your project name. Check "Create new workspace Select "Project", then "Add to Project". Add all filenames including any resource file (.RC) and SEE32.LIB. Lastly, select "Rebuild All".

Creating a new project in MSVC 6.0 follows the same logic as for MSVC 5.0.

3.3 Borland C/C++

Borland C/C++ programs can be compiled from either the command line or from within the Borland development environment.

In order to use SEE with Borland C/C++ version 5.0 or later, install using “INSTALL U”. To use with Borland version 4.0 or 4.5, install with "INSTALL B".

3.3.1 Borland Command Line Makefiles

Programs can be compiled using command line makefiles. All Borland Win16 command line makefiles end with “16._b_” while Borland Win32 command line makefiles end with ’32._b_”. To compile using a makefile, use the Borland MAKE utility. For example,

MAKE -f QUICK16._B_
MAKE -f QUICK32._B_

MAKE -f FROM16._B_
MAKE -f FROM32._B_

3.3.2 Borland IDE

To create a new project, first turn off LINKER case sensitivities: Choose "Options", "Projects", "Linker", "General". Turn off the "case sensitive link" and "case sensitive exports and imports" boxes.

Next, choose "Project", then "New Project". Use the INS (Insert) key to pop up a dialog box into which the project file names are entered.

Select "GUI" or "Console" for the "Target Model:" Only "Runtime" and "Dynamic" should be checked for "Standard Libraries:"

NOTE1
If, after linking in the IDE, you get unresolved external references to the library functions in which each function name is all upper case, then you have NOT turned off case sensitivity as described above.
NOTE2
If you get errors compiling the windows header file "WINDOWS.H", turn on "Borland Extensions" in "Options", "Project", "Compiler", "Source".

3.4 Borland Turbo C/C++ for Windows

Borland Turbo C/C++ for Windows does not have command line tools, so all programs must be compiled from the Turbo C/C++ integrated environment.

Follow the same directions as above (Borland IDE), except that the "Target Model:" can be any listed.

3.5 Borland C++ Builder

Borland C++ Builder does not have command line tools, so all programs must be compiled from the Borland C++ Builder integrated environment. Compile the BCB example program QM_PRJ with QM_PRJ.MAK if running BCB version 1 through 3, and compile with QM_PRJ.BPR if running BCB version 4 or above.

To load the QM_PRJ example project, Choose "File" / "Open Project" on the menu bar. Load QM_PRJ.MAK (or QM_PRJ.BPR). Then, choose "Build All" from "Project" to create the executable. Note that SEE32BCB.LIB is the LIB file used with Borland C++ Builder.


3.6 Watcom C/C++

Watcom C/C++ programs can be compiled from either the command line or from within the Watcom development environment.

In order to use SEE with Watcom C/C++ version 11.0 and after, install using “INSTALL U”. To use Watcom version 10.5 or 10.6, install with "INSTALL W".

Watcom cannot create Win16 Winsock programs.

3.6.1 Watcom Command Line Makefiles

Win32 programs can be compiled using command line makefiles. All Watcom command line makefiles end with "32._w_” for Win32 makefiles. To compile using a makefile, use the Watcom WMAKE utility. For example,

WMAKE -f QUICK32._W_
WMAKE -f FROM32._W_

Win32 programs can also be compiled using command line batch files. See MAILER32.BAT for an example of a console mode command line batch file and FROM32.BAT for an example of a GUI mode command line batch file. To run these command line batch files from the command line, type

QUICK32 W

Or

MAILER32 W

3.6.2 Watcom IDE

To create a new project, choose "File", then "New Project". Enter the project name and then choose Win32 as the target. Use the INS (Insert) key to pop up a dialog box into which the project file names are entered.

Select "Options" from the main window, then "C Compiler Switches", then "10". Memory Models and Processor Switches". Check "80386 Stack based calling [-3s]", then check "32-bit Flat model [-mf]".

3.7 Lcc-Win32 C/C++

Lcc-Win32 C/C++ programs can be compiled from either the command line or from within the development environment.

In order to use SEE with Lcc-Win32 C/C++, install using “INSTALL U”.

Lcc-Win32 is a freeware C compiler developed and distributed by Jacob Navia at

http://www.geocities.com/SiliconValley/Heights/9069/index.html

To use our DLLs with Lcc-Win32, you must link with SEE32LCC.LIB. This file can also be re-created using the Lcc-Win32 utility BUILDLIB.

buildlib see32.lcc see32lcc.lib

Then, compile and link as normal. For example, to compile the MAILER console mode example program,

lcc -DWIN32 mailer.c
lcclnk mailer.obj see32.lib -subsystem:console

To compile the GUI mode example FROM,

lcc -DWIN32 about.c
lcc -DWIN32 from.c
lcc -DWIN32 paint.c
lrc from.rc
lcclnk from.obj about.obj paint.obj see32lcc.lib from.res -subsystem:windows

See MAILER32.BAT for an example of a console mode command line batch file and FROM32.BAT for an example of a GUI mode command line batch file.

4.0 Compiling Example Programs

4.1 Static Libraries

The registered user can also statically link SEE16.OBJ or SEE32.OBJ rather than making calls to the DLL's. For an example, see the Microsoft command line makefile STAT32S._M_. These files are not available in the shareware version.

4.2 Editing EMAIL.H

The file EMAIL.H is included by most of the example programs and contains the following five defines:

   #define SMTP_HOST_NAME   "smtp_server_name"
   #define POP3_HOST_NAME   "pop3_server_name"
   #define YOUR_EMAIL_ADDR  "your_email_address"
   #define POP3_USER_NAME   "pop3_account_name"
   #define POP3_PASSWORD    "pop3_account_password"
and must be edited with your email configuration before compiling any of the example programs. This information is required for all email clients. If you are unsure of any of these settings, look in your email client program (Eudora, Pegasus, etc.). SMTP_HOST_NAME is the name (or IP address) of your SMTP email server. POP3_HOST_NAME is the name of your POP3 server, which is typically the same as the SMTP server. YOUR_EMAIL_ADDR is your email address. Brackets "<>" are required. POP3_USER_NAME is the account name for your email (POP3) account. POP3_PASSWORD is the password for you email (POP3) account. For example,
   #define SMTP_HOST_NAME    "mail.hiwaay.net"
   #define POP3_HOST_NAME    "mail.hiwaay.net"
   #define YOUR_EMAIL_ADDR   "Mike Marshall<mike@marshallsoft.com>"
   #define POP3_USER_NAME    "marshallsoft"
   #define POP3_PASSWORD     "qwerty"

4.3 Key Codes

SEE16.DLL and SEE32.DLL have a keycode encoded within them. Your keycode is a 9 or 10 digit decimal number (unless it is 0), and will be found in the file KEYCODE.H. The keycode for the shareware version is 0. You will receive a new key code when registering. If you get an error message (value -74) when calling seeAttach, it means that the keycode in your application does not match the keycode in the DLL. After registering, it is best to remove the shareware version of the SEE DLL's from the Windows search.

5 Example Programs

Before compiling any of the example programs, edit the file EMAIL.H with your email configuration as explained in section 4.2 "Editing EMAIL.H". Most of the example programs are written in Win32 console mode. This was done in order to provide the clearest possible code, without the complication and complexity of GUI code. All console mode programs can be converted to GUI mode by coding the necessary windows code. The first example program SEEVER displays the SEE library version number and registration string. From the command line, type: SEEVER SEEVER can be compiled from either the command line or from Microsoft Visual Studio (SEEVER32.MAK). The CODETEST example program demonstrates how to call seeDecodeBuffer and seeEncodeBuffer.

5.1 SMTP Example Programs

There are 8 SMTP example programs. SMTP programs send email.

5.1.1 AUTO

AUTO (“auto-responder”) is a Win32 console mode program that uses two channels concurrently to automatically respond to all new email. AUTO takes no arguments.

5.1.2 MAILER

MAILER is a Win32 console mode program that emails a message, taking its input from the command line. For example, to email the file TEST.MAI with subject "test" to mike@marshallsoft.com with (optional) attachment TEST.ZIP, type

MAILER @test.mai Test "<mike@marshallsoft.com>" test.zip

Note that <> brackets are required around the email address.

5.1.3 QUICK

QUICK is a Win16/Win32 GUI (Graphical User Interface) application that emails a message entered into a dialog box. All necessary information is entered at runtime into dialog boxes. QUICK can be compiled from either the command line or from Microsoft Visual Studio (QUICK32.MAK).

5.1.4 QM

"Quick Message" (QM_PRJ & QM_PGM) is a Borland C++ Builder (Win32 GUI) program that emails a message from the GUI. Borland C++ Builder is required to compile this program. All necessary information is entered at runtime into dialog boxes. Compile using QM_PRJ.MAK for BCB version 1 through 3, and QM_PRJ.BPR for BCB version 4 and above.

5.1.5 MFC_PGM

MFC_PGM is a Microsoft Foundation Class (MFC) example program. Win16 (MFCPGM16.MAK) and Win32 (MFCPGM32.MAK) makefiles are provided. File NAFXCW.LIB may have to be copied from MFC\LIB on your Microsoft Visual C/C++ CD disk.

5.1.6 BCAST

BCAST is a Win32 console mode program which emails the same message (BCAST.MAI) to a list of addresses taken from the file BCAST.EML containing one email address per line. BCAST takes no arguments. To start BCAST, type

BCAST

Please DO NOT use this for spam! Refer to BCAST.C for more details of use.

5.1.7 VERUSR

VERUSR (Verify User) accepts multiple email addresses on the command line. It connects to the SMTP server for each email address and requests verification of the user. For example, to verify msc@traveller.com and sales@marshallsoft.com, type

VERUSR msc@traveller.com sales@marshallsoft.com

Due to security concerns, some SMTP servers will not honor a "verify user" request. A user that does not verify does NOT necessarily mean that the email address is not good.

5.1.8 RegMe

REGME (Register Me) connects to your SMTP server in order to allow a third party (such as your customers) to send you email, such as registration information. RegMe is a Win16/WIN32 example.

5.2 POP3 Example Programs

There are nine POP3 example programs. These examples read email.

5.2.1 STAT

STAT is a very simple Win32 console modem program that returns the number of email messages waiting on the POP3 server. This is the first POP3 example to edit, compile, and run. STAT takes no arguments. To run STAT, type

STAT

STAT can be compiled from either the command line or from Microsoft Visual Studio (STAT32.MAK).

5.2.2 FROM

FROM is a Win16/Win32 GUI application that reads and displays selected header information, without reading the entire email message. FROM also makes a very handy utility program.

FROM can be compiled from either the command line or from Microsoft Visual Studio (FROM32.MAK).

5.2.3 STATUS

STATUS is the Win32 console mode equivalent of FROM. STATUS takes no arguments. All required information is taken from EMAIL.H. To run STATUS, type

STATUS

5.2.4 DELETE

DELETE is a Win32 console mode program that deletes an email message from the server. Be careful! Once deleted, an email message cannot be recovered. All required information except the email range to delete is taken from EMAIL.H. For example, to delete email messages 2 through 5, type

DELETE 2 5

5.2.5 READER

READER is a Win32 console mode program that reads an email message, including any MIME attachments, saving it to disk. For example, to read email message #1 and save it as file MYMAIL.TXT,

READER 1 MYMAIL.TXT

Any attachments are saved to the current directory.

5.2.6 READS

The READS program is similar to READER except that it reads all email from the POP3 server. READS takes no arguments. All required information is taken from EMAIL.H. To run, type

READS

Any attachments are saved to the current directory.

5.2.7 GETDOC

GETDOC is a simple automatic email document retrieval system. It looks for commands on the subject line of incoming mail. If "LIST" is found as the subject of an email (without any email body), the GETDOC program emails LIST.TXT to the sender. The LIST.TXT file should contain a list of all available documents.

If "GET docname" is found as the subject of an email message (without any email body), the GETDOC program emails the requested file (docname) to the sender, provided that the requested file is available.

GETDOC takes no arguments. All required information is taken from EMAIL.H. To run, just type

GETDOC

5.2.8 THREAD

THREAD is a Win32 console mode program that uses threads to check several POP3 mailboxes simultaneously. You must edit THREAD.C with the POP3 mailbox settings to check before compiling.

5.2.9 GETRAW

GETRAW is a Win32 console mode that downloads a specified email message without decoding it. This is used to see what the email looks like on the server. GETRAW takes all its arguments from the command line. For example, to read email message 2 into file EMAIL.TXT, type

GETRAW 2 EMAIL.TXT


6 Revision History

Version 1.0
June 1, 1998.
The official release of version 1.0.
Version 2.0
September 14, 1998.
A major update adding POP3 capability. Another SMTP example program (BCAST).
Version 2.1
November 16, 1998.
Time zone calculated automatically. Fixed bug in seeClose. Corrected POP3 problem when boundary definition on 2nd line. Added support for alternate MIME boundaries. Added seeVerifyUser function. Added SEE_GET_REGISTRATION, SEE_GET_CONNECT_STATUS. Added SEE_GET_ATTACH_COUNT, and SEE_GET_LAST_RESPONSE. Added GETDOC, SEEVER, and VERUSR example programs. SMTP performance improved. Added seeEncodeBuffer and seeDecodeBuffer functions.
Version 3.0
April 1, 1999.
Modified SEE to be fully threadable (adding seeAttach and seeRelease). Added seeGetEmailUID function. Handles "inline" email text properly. Optionally decodes unnamed attachments. Added ability to add header lines (SEE_SET_HEADER). Can use alternate ports for SMTP or POP3. Win16 version can get time zone from TZ environment variable. Quoted-printable messages can handle soft line breaks. Quoted-printable message can handle embedded HTML text.
Version 3.1
July 12, 1999.
Support ISO-8859-1 (Q or B) encoded attachment filenames. Support ISO-8859-1 (Q only) on subject line. SEE_SAVED_TO_MSG added. Don't write "+OK" line to email message file. Added seeExtractLine function.
Version 3.2
January 10, 2000.
Added QUOTED_8859 processing (QUOTED_8859). Can decode printed quotable attachments! seeGetEmailLines can use internal memory. Added SEE_WRITE_TO_LOG to seeStringParam. Added SEE_GET_ATTACH_NAMES to seeDebug to get attachment filename list. Ability to reset the SEE_SET_HEADER header string to "nothing". Improvements in dynamic memory usage. Added GETRAW and CODETEST examples. Added support for Lcc-Win32. Added seeCommand function.