[DGD]Sending emails through DGD?

Lord Lerkista lerkista at planetatierra.net
Tue May 1 02:38:45 CEST 2001


>  * Write a kfun that does it. Ick.
>

i put this in dgd/src/kfun/extra.c

----------CUT HERE-------

# ifdef FUNCDEF
FUNCDEF("sendmail", kf_sendmail, pt_sendmail)
# else
char pt_sendmail[] = { C_TYPECHECKED | C_STATIC, T_VOID, 3, T_STRING,
T_STRING, T_STRING };

int kf_sendmail(f)
register frame *f;
{
         FILE *fd;
         char *command;
         command = malloc(128);
         sprintf(command,"mail -s \"%s\" %s <%s",
         
f->sp[2].u.string->text,f->sp[1].u.string->text,f->sp[0].u.string->text);
         system(command);
         str_del((f->sp++)->u.string);
         str_del((f->sp++)->u.string);
         free(command);
         return 0;
}
#endif

----------CUT HERE-------

and i use in the mud 
sendmail(,"subject","email at dest.com","/txt/mail.txt"); to send the 
email!! =)
and works fine!!

i tried to patch DGD 1.2 with the network package by myself but i 
can't!! =/
so this is the simple way i found to do that!1

List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list