[DGD]External commands

Greg Lewis glewis at eyesbeyond.com
Sat Mar 31 23:23:25 CEST 2001


On Sat, Mar 31, 2001 at 12:54:15PM +0100, Matthew Jenkins wrote:
> Yep - here it is...
> 
> Drop this into one of your existing kfun files, recompile dgd, reboot, and
> you should have the sendmail() function...
> 
> I'm sure the system call can be cleaned up a bit, but it does the job I
> want it to, so why change? ;)

If you were, say, using the networking package you could do all this in
LPC.  Just open a socket to a local smtp server and bang the message into
it.  This isn't anymore difficult than the kfun presented (all the 
appropriate commands were used in the kfun).  IMO this has the advantage:

1. There are no external system calls.
2. Permission to open such sockets can be controlled from within DGD.
3. Its not only platform independent, its also MTA independent.

Which is not a criticism of your kfun, just my opinion of a possibly
better option.

-- 
Greg Lewis                            Email : glewis at eyesbeyond.com
Eyes Beyond                           Mobile: 0419 868 494
Information Technology                Web   : http://www.eyesbeyond.com


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



More information about the DGD mailing list