Libsmtp - A simple SMTP library (C)opyright 2001-2002 Kristian Van Der Vliet Introduction Libsmtp is a small, simple library that allows you to easily send email with SMTP. The API is small & clean, and the library does not rely on any other libraries other than Glibc. Libsmtp was originally written as part of the Whisper mail client for the AtheOS operating system, but has been tested and is known to compile & work on both AtheOS 0.3.7, and Linux Mandrake 8.0 Other versions of Linux are expected to work. You can contact me at vanders@cableinet.co.uk, and you can check for new versions of libsmtp on my webpage at http://www.shagged.org/~vanders/ License Libsmtp is distributed under the GNU Lesser General Public License, and is Copyright 2001-2002 Kristian Van Der Vliet. Please see the file COPYING, included with Libsmtp, for more information. Alternatively, you can visit the GNU website at http://www.gnu.org Building & Installing Libsmtp can be built as either a static (.a) or shared (.so) library, and the Makefile includes targets for both. By default Libsmtp is built as a static library. To build libsmtp as a static library, enter the following commands: bash$ make To build libsmtp as a shared library, enter the following commands: bash$ make shared If you build libsmtp as a static library, you can copy the libsmtp.a & inc/libsmtp.h files to wherever you wish (In most cases, this will be in your project working directory). If you build libsmtp as a shared library, you should also run "make install". The shared object libsmtp.so is copied to /usr/lib/ and the header file inc/libsmtp.h is copied to usr/includes/ Using libsmtp For information on the libsmtp API, please see the file API, which is included with libsmtp. Compiling with libsmtp depends on wether you are using the static or the shared library. If you are using the shared library, you can build a project by including -lsmtp in your GCC flags. For example: bash$ gcc myproject.c -lsmtp -o myproject Will link your code against libsmtp which is in /usr/lib/. If you are using the static library, you must also tell GCC the path to the library object (libsmtp.a). For example, if you have copied libsmtp.a into your project directory, in a subdirectory named "libs", you could use: bash$ gcc myproject.c -L./libs/ -lsmtp -o myproject You can find more about the GCC flags from the GCC manual page or with the online documentation at http://www.gnu.org