sandeep kumar writes:
For every mail notification that is sent to moderator for approval he should also receive the SMS on his mobile saying so and so list is pending for approval. This is the requirement of the customer.
For the future, you don't have to explain why you want a feature until we ask for it.
For SMS the message will be shortened form say "mail to X list from Y person is pending for your approval".
Yeah, of course this needs to be shorter. This could be parsed from the normal mail by the SMS gateway, or some kind of front end to the gateway.
When I mean by SMS gateway it is nothing but a SMS service that we are already using for other purposes. We give an input to the SMS server with phone number and message it will send the SMS to user.
My question is what form is this input, email or something else?
I need to fetch the moderator email address of every list when an email is sent to list. I am facing some challenges here in getting the moderator email address. Can you please help where in the mailman code can I get the moderator email address when a mail is sent to the list.
I guess you're trying write such a front-end yourself.
It depends on how you are going to access the database. Mark explained how to do this directly.
Alternatively, you can create the frontend client as an external process, using the mailmanclient library to access the REST API to get that information. I think this is what Mark suggested, and it's the preferred method because it means you do not have to maintain a vendored version of Mailman itself. The REST API is versioned, so you can be sure that your code either works right or it fails loudly. The internal API is not versioned and not going to be backward compatible, so you risk having your code break every time you upgrade.
You'd still need to have a small Handler to trigger the external frontend, but everything you need for the trigger is already in the message object (the mailing list's identity), and that part of the internal API is extremely unlikely to change.