FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Plugins and Code Hacks » Mailing List Functionality w/crontab, instead of .procmailrc or .forward
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Mailing List Functionality w/crontab, instead of .procmailrc or .forward [message #14860] Sat, 22 November 2003 19:44 Go to previous message
blackops is currently offline  blackops   United States
Messages: 12
Registered: July 2003
Karma:
Junior Member
I have written a script that logs into a POP server and grabs one message at a time, routing them through mailinglist.php, until the POP account has no more new messages. You can use this script to enable mailing list integration by completing the following steps. The benefit is that you do not need .procmailrc support to work with a mailing list.
  1. Enable mailing list integration for a given forum
  2. Create a POP account that will only be used as a dummy subscriber to the mailing list you want to integrate
  3. Use this script, scheduled by crontab, to access the POP account on a regular basis to download new messages from the mailing list and import them into the forum (every 15 minutes, or so, should do it).

HOW IT WORKS:
This script creates a temp file, logs into a POP server, downloads one message at a time, storing it in the temp file, and pipes the contents of that file into maillist.php. It expects two command-line arguments: POP_account_name and list_id.

Example from the command line:

php -q /home/virtual/site2/fst/var/www/html/test/fmail.php f-general-user 2

The code is attached. Notice the few places I have <TEXT>. Please replace those occurrences (including the "<" and ">") with the actual values.
  • Attachment: fudmail.php
    (Size: 1.25KB, Downloaded 1448 times)
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Request: Message body color based on user level
Next Topic: extra line breaks and anchors when editing/quoting mailing list posts
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Mon Nov 25 01:15:07 GMT 2024

Total time taken to generate the page: 0.04750 seconds