Mailcommand: manage mailing lists by email
Last updated on
30 April 2025
The mail command module can be used to execute Drupal commands through email. This basic functionality can be extended by other modules. The og2list module uses this to allow users to subscribe to mailing lists. This is useful when group managers do not have access to web based connections.
Mail command allows you to perform the following command much like mailing list managers. Mail command is current limited to handle only 5 commands per hour and user to avoid a denial of service attack.
Available commands:
- help This command allows you to receive information on how to use the mailcommand capabilities here on your OG2List site. It takes no arguments.
- confirm This command allows you to confirm commands given to the mail processor at OG2List site. It takes one argument, an auto-generated token.
- discard This command allows you to discard commands given to the mail processor at OG2List site. It takes one argument, an auto-generated token.
- tokentest This command allows you to test token processing done by the mail processor at OG2List site. It takes one mandatory and two optional arguments. The first argument can be any PHP function and the others will be passed as arguments. This action requires the permission 'test tokens'
Og2list extends mailcommand by
- Enabling mailcommand to receive through the og2list perl scripts which makes mailhandler unnecessary.
- enabling a single administration address for all og2list related activities
- implementing the "subscribe" command. This command requires three arguments: The lists mail address (localpart only), the mail address to subscribe, and the name of the subscriber (optional and only used when a new account is created).
- implementing the "unsubscribe" command. This command requires two arguments, the list address, and the mailing list of the subscriber.
You can:
- create a mailhandler mailbox with "mailcommand: 1" in the "Default commands:" textbox to enable mailcommand on that mailbox at administer > > mailhandler.
- Send a message to a properly configured mailhandler mailbox with the text "help" in the subject or body to receive commands.
- Send commands to a properly configured mailhandler mailbox with the command in the subject or body of the email.
Help improve this page
Page status: Not set
You can:
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion