[Mailman-Users] Email Header

Doug La Farge doug at holdit.com
Wed Jun 5 02:13:34 CEST 2002


Thanks one and all for the ideas. LuKreme started me off on the "right" track.
I think I now have it dialed in.

using .procmailrc:

:0
* ^To:.*newsletter
* ^Subject:.*Newsletter
| ./sendletter.pl

Looking at sendletter.pl:

#!/usr/bin/perl
use Mail::Sendmail;

while (<>){ $email .= $_ }
$sql = "select email from users";
#loop the SQL call
%mail = ( To  => "#emailaddress",
         From    => 'ournewsletter at foo.com',
         Subject => 'Our weekly news letter',
         Message => "$email"
);
sendmail(%mail) or die $Mail::Sendmail::error;
#end the SQL call

Some trickery is still require to strip out all the header info and 
just grab the body.

So Mailman is bagged - and probably for the better.  It's cool so it 
will stay in my bag of tricks if needed again. If anyone is 
interested in the final script email me and let me know. I'll send 
you the full working version.

Again, thanks for all the input!


At 4:28 PM -0700 6/4/02, Steven Shults wrote:
>I think scott basically said this, but to simplify matters:  if your
>user wants to send a webpage instead of an email, post the webpage on
>the intranet and email the URL to the intended recipients.
>
>~steven
>
>>  -----Original Message-----
>>  From: mailman-users-admin at python.org
>>  [mailto:mailman-users-admin at python.org] On Behalf Of Satya
>>  Sent: Tuesday, June 04, 2002 4:03 PM
>>  To: mailman-users at python.org
>>  Subject: Re: [Mailman-Users] Email Header
>>
>>
>>  On Jun 4, 2002 at 14:07, Doug La Farge wrote:
>>
>>  >Because the user of this list needs to be able to send from their
>>  >Outlook Express client with all the fancy images and formatting.
>>
>>  >Yeah, I've got a basic little Perl script that already does this
>>  >including the SQL pull. Heck, maybe I can have sendmail write the
>>  >file to "letter.txt" and run a cron job to send it.  I guess the
>>  >question is where will the images end up....
>>
>>  Scott Courtney has some very good suggestions. Here's mine. Have your
>>  OE user send the form to a specific address on your mailserver.
>>
>>  Now the magic starts. Have sendmail (or whoever) hand the email off to
>>  your perl script, which can then inject it back into the mail system
>>  with appropriate SMTP envelopes, leaving the SMTP body alone.
>>
>>  I still prefer Scott's solution, but YMMV.
>>
>>  --
>>  Satya. <URL:http://satya.virtualave.net/>
>>  A year spent in artificial intelligence is enough to make one
>>  believe in
>>  God.
>>
>>
>>
>>
>>  ------------------------------------------------------
>>  Mailman-Users mailing list
>>  Mailman-Users at python.org
>>  http://mail.python.org/mailman/listinfo/mailman-users
>>  Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py
>>
>
>
>
>------------------------------------------------------
>Mailman-Users mailing list
>Mailman-Users at python.org
>http://mail.python.org/mailman/listinfo/mailman-users
>Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py


-- 
-Doug
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/mailman-users/attachments/20020604/3af9a369/attachment.htm 


More information about the Mailman-Users mailing list