[DGD]Sending emails through DGD?

Erwin Harte harte at xs4all.nl
Mon Apr 30 19:22:33 CEST 2001


On Tue, May 01, 2001 at 01:10:55AM +0800, John West McKenna wrote:
> Mordengaard writes:
> 
> >I'm trying to set up a system that automatically emails a player their
> >password when they create a new account.  Is there currently support for
> >this in DGD, or does anyone know what changes might need to be made to
> >implement this feature?
> 
> You'll need to add the networking package to the driver (I believe it
> hasn't yet been updated for the latest version), and then write some code
> to speak SMTP to the player's machine.
> 
> This is fairly simple.  Connect to port 25, and send something like:
> (copying from some code that I didn't write - apologies if this is wrong.
> Read the RFC before you do this)

Definitely.

> 	EHLO mymud.muds-r-us.com

You may want to use HELO instead unless you're willing to speak ESMTP.

> 	MAIL FROM: gumby at mymud.muds-r-us.com
> 	RCPT TO: fred at freds.mail.com
        DATA
> 	To: fred at freds.mail.com
> 	From: gumby at mymud.muds-r-us.com
> 	Subject: Here's your password
> 	
> 	fooble
> 	.
> 	QUIT
> 
> Something like that.  Read the RFC.

Which among other things will tell you to insert a '.' for lines
starting with one, in your message, and will of course tell you to
check the return-codes after each and every command you send to the
server so that you won't be trying to send something to a server that
is telling you to back off b/c it's overloaded, for instance. :-)

Erwin.
-- 
Erwin Harte      : `Don't mind Erwin, he gets crabby. :)'
harte at xs4all.nl  :    -- Par Winzell <zell at skotos.net>

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



More information about the DGD mailing list