home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hot Shareware 35
/
hot35.iso
/
ficheros
/
LC
/
SEE4C10.ZIP
/
MULTI.C
< prev
next >
Wrap
C/C++ Source or Header
|
1998-05-31
|
3KB
|
70 lines
/*
** MULTI.C
*/
#include <windows.h>
#include <stdio.h>
#include "see.h"
/////////////////////////////////////////////////////////
////// IMPORTANT: edit these definitions before compiling
#define SMTP_HOST_NAME "smtp_host_name"
#define YOUR_EMAIL_ADDR "your_email_address"
#define FIRST_SEND_TO "1st receipient's email address"
#define SECOND_SEND_TO "2nd receipient's email address"
////// EXAMPLE //////////////////////////////////////////
// #define SMTP_HOST_NAME "mail.myisp.net"
// #define YOUR_EMAIL_ADDR "<me@myisp.com>"
// #define FIRST_SEND_TO "<mike@marshallsoft.com>"
// #define SECOND_SEND_TO "<pam@marshallsoft.com>"
/////////////////////////////////////////////////////////
static char Buffer[512];
void ErrorExit(int Code)
{seeErrorText(Code,(LPSTR)Buffer,512);
printf("%s\n", Buffer);
exit(0);
}
/*** main ***/
void main(int argc, char *argv[])
{int Code;
/* define diagnostics log file */
seeStringParam(SEE_LOG_FILE, (LPSTR)"multi.log");
puts("Calling seeConnectTo()...");
Code = seeConnectTo(
(LPSTR)SMTP_HOST_NAME, /* SMTP server */
(LPSTR)YOUR_EMAIL_ADDR, /* our return email address */
(LPSTR)NULL); /* Reply-To header */
if(Code<0) ErrorExit(Code);
/* send first email [Please edit addresses below] */
puts("Calling seeSendEmail() #1 ...");
Code = seeSendEmail(
(LPSTR)FIRST_SEND_TO, /* To list */
(LPSTR)NULL, /* CC list */
(LPSTR)NULL, /* BCC list */
(LPSTR)"MULTI Example Program", /* subject */
(LPSTR)"Hello from MULTI.C !!!\r\nBye!", /* text message */
(LPSTR)NULL); /* no attachment */
if(Code<0) ErrorExit(Code);
/* send second email */
puts("Calling seeSendEmail() #2 ...");
Code = seeSendEmail(
(LPSTR)SECOND_SEND_TO, /* To list */
(LPSTR)NULL, /* CC list */
(LPSTR)NULL, /* BCC list */
(LPSTR)"MULTI Example Program", /* subject */
(LPSTR)"@test.mai", /* message in file */
(LPSTR)"test.zip"); /* attachment (size will be multiple of 4) */
if(Code<0) ErrorExit(Code);
puts("Calling seeClose()...");
Code = seeClose();
if(Code<0) ErrorExit(Code);
} /* end main */