Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I need to find a solution with perl for a mailing lits. Which means that, 1. a number of ppl should be receiving mails sent to one specific address 2. any one of the above ppl can send a mail to the same address to be sent to everybody I know how to use sendmail to send mail. Therefore i can maintain a database of e-mail addresses to which I'll have to send the mail. But i can not think out the rest of the solution (I preferably don't want a solution that's only web-based; i.e. ppl will have to compose the mail on a web page in order to send it). Can the Monastery pls help me?

Replies are listed 'Best First'.
Re: Perl mailing list
by Corion (Patriarch) on Oct 19, 2003 at 18:05 UTC

    For a very simple and simplicistic solution you might want to consider Mail::SimpleList by chromatic, which makes it easy to create short-lived mailing lists.

    For a more comprehensive solution, you might want to look at Siesta, which is a mailing list manager in Perl.

    Still the defacto standard for mailing lists is mailman, a Python program that Siesta hopes to depose from its reign.

    perl -MHTTP::Daemon -MHTTP::Response -MLWP::Simple -e ' ; # The $d = new HTTP::Daemon and fork and getprint $d->url and exit;#spider ($c = $d->accept())->get_request(); $c->send_response( new #in the HTTP::Response(200,$_,$_,qq(Just another Perl hacker\n))); ' # web
Re: Perl mailing list
by batkins (Chaplain) on Oct 19, 2003 at 18:16 UTC
    A quick search on CPAN turned up Mail::SimpleList. Looks like it might do the job.

    The computer can't tell you the emotional story. It can give you the exact mathematical design, but what's missing is the eyebrows. - Frank Zappa
Re: Perl mailing list
by PriNet (Monk) on Oct 20, 2003 at 06:58 UTC
    it's kinda hard to post this cause it almost caused a divorce *heh*, took me about 6 months to compress into a simple routine. there wasn't much info on this anywhere. hope it helps...
    ###################################################################### # (Author) PriNet (c)542R767G265A (e-)gary@prinet.org ###################################################################### # sub::email(www.server.com,bounce@address,send@to,from,to,subj,body); ###################################################################### # www.server.com = mail servers address, ie; "mail.isp.com" # bounce@address = a valid email address on "isp.com" # send@to = email address to send to # from = (hopefully) YOUR REAL NAME # to = recipients name (not address) # subj = subject # body = message ###################################################################### sub email { @Data = @_; $main::SIG{'INT'} = close (SMTP); socket (SMTP, AF_INET, SOCK_STREAM, 6); connect (SMTP, pack('S n a4 x8', AF_INET, 25, (gethostbyname($Data +[0])) [4])); select (SMTP); $| = 1; select (STDOUT); recv (SMTP, $Dummy, 200, 0); send (SMTP, "HELO $Data[0]\n", 0); recv (SMTP, $Dummy, 200, 0); send (SMTP, "MAIL FROM: <$Data[1]>\n", 0); recv (SMTP, $Dummy, 200, 0); send (SMTP, "RCPT TO: <$Data[2]>\n", 0); recv (SMTP, $Dummy, 200, 0); send (SMTP, "DATA\n", 0); recv (SMTP, $Dummy, 200, 0); send (SMTP, "From: \"$Data[3]\"\n", 0); send (SMTP, "To: $Data[4]\n", 0); send (SMTP, "Subject: $Data[5]\n", 0); send (SMTP, "\n", 0); send (SMTP, "$Data[6]\n", 0); send (SMTP, "\r\n.\r\n", 0); recv (SMTP, $Dummy, 200, 0); send (SMTP, "QUIT\n", 0); recv (SMTP, $Dummy, 200, 0); close (SMTP); return; ######################################################################
    try to give me credit (PriNet) if you use this
    NO SPAM !!!


    you mean there's any easier way?