[Home] [Groups] - Message: [Prev in Group] [Next in Group]

nu.kanga.list.mud-dev

4482: Re: [MUD-Dev] Mail from mud

[Full Header] [Plain Text]
From: Vadim Tkachenko <vadimt@4cs.com>
Newsgroups: nu.kanga.list.mud-dev
Date: Tue, 23 Dec 1997 11:11:40 -0600
References: [1]
Organization: Kanga.Nu
Stephen,

> Heyas...gonna ask for a little technical info here.  I would like to have my code be able to send a mail message to the
> player, using a stored email address, but I'm not too sure how to go about constructing a valid message/header, etc.
> Anyone done this, or something similar?  I was thinking of somehow writing a file, then sending a command to the shell
> from the mud queueing the mail for delivery, but I really am not sure how to do that..

As for me, the most straightforward way of sending mail is to use
sendmail. If you're operating in UNIX, that's peanuts, especially perl - 

open( SENDMAIL,"|`which sendmail`" );
print SENDMAIL ... # Don't forget your headers, as in RFC822
close SENDMAIL; # This commits the delivery, otherwise it will wait
until your process terminates, which is probably not what you want :-)

Syntax is approximate, you WANT to check it :-)

In other cases/operating systems, it would be probably better to talk to
sendmail too - you just telnet (open socket connection) to the nearby
UNIX' port 25 and go ahead as RFC822 says.

Draft Java implementation is available on request.

> Zoran

--
Still alive and smile stays on,
Vadim Tkachenko <VadimT@4CS.Com>
--
UNIX _is_ user friendly, he's just very picky about who his friends are