| |smallsrv.com| | |Description| | |Get sndmsg.exe| | |Soft| | |Forum| | |License| |
Next keys are supported: -t -- read recipients from message -o d:\outbox\foulder -- OUTBOX subderectory in Small HTTP server -o smtp://smtp.address[:25] -- Out to SMTP server -f from@address -F full name -s -- save From lines in headers -m filename -- message file instead stdin -a filename -- attach binary file Other keys are ignored. to@address or key -t must be.You can write your own replacement of sendmail. Here is an example on C of function that replace popen("/usr/bin/sendmail to@address","w"):
#include <time.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
const char outbox[]="..\\..\\outbox"; // Here you must direct your path to OUTBOX.
FILE * sendmail(char *from,char *to)
{
char bfr[512];
int t;
FILE *r;
struct stat st;
t=time();
do{ // find uniq file name.
sprintf(bfr,"%s\\%8.8X.msg",outbox,--t);
}while( stat(bfr,&st)!=-1 )
r=fopen(bfr,"w");
fprintf(r,"From %s (via Web [%s]) %s For %s\n",
from, getenv("REMOTE_ADDR"), getenv("DATE_GMT"), to);
return r;
};