home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hot Shareware 35
/
hot35.iso
/
ficheros
/
LC
/
SEE4C10.ZIP
/
MAILER.C
< prev
next >
Wrap
C/C++ Source or Header
|
1998-05-31
|
2KB
|
52 lines
/*
** MAILER.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 SEND_TO "receipient's email address"
////// EXAMPLE //////////////////////////////////////////
// #define SMTP_HOST_NAME "mail.myisp.net"
// #define YOUR_EMAIL_ADDR "<me@myisp.com>"
// #define SEND_TO "<mike@marshallsoft.com>"
/////////////////////////////////////////////////////////
static char Buffer[512];
void ErrorExit(int Code)
{seeErrorText(Code,(LPSTR)Buffer,512);
printf("SEE Error %d: %s\n", Code, Buffer);
exit(1);
}
void main(int argc, char *argv[])
{int Code;
/* connect to SMTP server */
puts("Calling seeConnectTo()...");
Code = seeConnectTo(
(LPSTR)SMTP_HOST_NAME, /* SMTP server */
(LPSTR)YOUR_EMAIL_ADDR, /* return email address */
(LPSTR)NULL); /* Reply-To header */
if(Code<0) ErrorExit(Code);
/* send email */
puts("Calling seeSendEmail()...");
Code = seeSendEmail(
(LPSTR)SEND_TO, /* To list */
(LPSTR)NULL, /* CC list */
(LPSTR)NULL, /* BCC list */
(LPSTR)"MAILER Test", /* subject */
(LPSTR)"This is a test.\r\n\r\n--Mike", /* message text */
(LPSTR)NULL); /* MIME attachment */
if(Code<0) ErrorExit(Code);
puts("Calling seeClose()...");
Code = seeClose();
} /* end main */