librelist archives

« back to archive

Implementing a mailing-list and librelist source code

Implementing a mailing-list and librelist source code

From:
Aurélien Aptel
Date:
2015-03-30 @ 19:36
Hi!

I'm trying to make an email user interface for a toy project of mine.
I've never had to programatically handle emails but lamson seems like
a good starting point. The app in question would work like a mailing
list, that's why I'd like to peek at librelist source code, to see how
it is implemented. Here's how my interface would work:

- Users register their email on the webapp.
- When some event happen on the webapp, a new thread is made (the
server sends an email to every subscribers)
- Users can reply and all emails are forwarded to other registred
users (work like a mailling list)
- Discussions can be browsed on the webapp (like a mailing list archive).
- Some event on the webapp can trigger an automated reply to an existing thread.

If you remove the app logic, the email-related functions I need are
(python pseudo-code):

    # sends msg to every address in subscriber_list
    thread_id = create_thread(msg, subscriber_list)

    # add a reply to an existing thread (sends emails to every subscriber)
    send_email(thread_id, msg, subscriber_list)

    # callback function called when a subscriber email is received
    def recv_email(thread_id, msg):
        do_stuff(thread_id, msg)   # let my app handle it
        send_email(thread_id, msg, subscriber_list) # forward it to subscribers

Lamson looks like the right tool for the job. Can anyone tell me
roughly how/where would you implement these? Some pointers to start
would be nice.

Re: Implementing a mailing-list and librelist source code

From:
Juan Luis Cano
Date:
2015-03-30 @ 20:30
On 2015-03-30 21:36, Aurélien Aptel wrote:
> Hi!
>
> I'm trying to make an email user interface for a toy project of mine.
> I've never had to programatically handle emails but lamson seems like
> a good starting point. The app in question would work like a mailing
> list, that's why I'd like to peek at librelist source code, to see how
> it is implemented. Here's how my interface would work:
>
> - Users register their email on the webapp.
> - When some event happen on the webapp, a new thread is made (the
> server sends an email to every subscribers)
> - Users can reply and all emails are forwarded to other registred
> users (work like a mailling list)
> - Discussions can be browsed on the webapp (like a mailing list archive).
> - Some event on the webapp can trigger an automated reply to an existing thread.
>
> If you remove the app logic, the email-related functions I need are
> (python pseudo-code):
>
>      # sends msg to every address in subscriber_list
>      thread_id = create_thread(msg, subscriber_list)
>
>      # add a reply to an existing thread (sends emails to every subscriber)
>      send_email(thread_id, msg, subscriber_list)
>
>      # callback function called when a subscriber email is received
>      def recv_email(thread_id, msg):
>          do_stuff(thread_id, msg)   # let my app handle it
>          send_email(thread_id, msg, subscriber_list) # forward it to subscribers
>
> Lamson looks like the right tool for the job. Can anyone tell me
> roughly how/where would you implement these? Some pointers to start
> would be nice.

Hello,

Lamson is probably the wrong tool for the job, because its author can 
take it off your hands "at any time for any reason":

https://github.com/zedshaw/lamson/blob/master/LICENSE#L21

There is a fork you can use with a sane license but equally unmaintained:

https://github.com/moggers87/salmon

Kind regards,

Juan Luis Cano