Firefox PHP

Module: Mailing List

Module: Mailing List
April 01, 2008 06:09AM
Module: Mailing List
Version: 1.6.1
Author: Oliver Riesen <oliver@riesen.org>

Sends new topics to one or more forum specific mailing lists (for example managed by Majordomo or Mailman).

Tested on version 5.2.21


License:

Free to use, modify, or redistribute this code so long as I am given credit for the original development somewhere. This code comes with absolutely no warranty.


Requirements:

Minimum Phorum version: 5.2.21.

If you want to mail post attachments you have to install and enable the Send Mail Through SMTP Module which is part of the core distribution of Phorum.


Installation:

1. Unpack the archive.

2. Move the directory "mailinglist" to the directory "mods" within your Phorum installation. Don't change the directory name!

3. Login as administrator in Phorum's administrative interface and go to the "Modules" section.

4. Enable the module "Mailinglist".

5. Go to the settings screen for the module to add email addresses for the receiving mailing lists.


Module settings:



Use system settings for stripping HTML and BBcode [tags]?

If this option is marked all HTML and BBcode [tags] are stripped from the body depending on the "General Settings".

Default value is checked.


Use individual FROM addresses

If this option is marked you can configure for each forum the FROM address as sent to the mailing list. If you don't to set a FROM address for a forum, then the system email FROM address is used.

When changing this option you have to save the settings to reflect change in the settings form.

Default value is unchecked.


Define mailing list destinations and email FROM addresses

Insert one or more valid destination email addresses (your mailing lists). Separate several addresses by comma. Insert a single FROM address, or leave blank to use the system email FROM address.


Language support:

This module supports multiple languages.

The following languages are included:

- English
- German (formal)
- German (informal) male
- German (informal) female

If you want to translate the module to a new language, you´ll have to do the following:

Copy lang/english.php to lang/yourlang.php (yourlang.php must have the same name as Phorum´s main language file that you use). After this, translate the strings in lang/yourlang.php.

If you have created a translation for this module, please post a zip file containing lang/yourlang.php in the module thread at phorum.org, so the translation can be added to the module package.


Sanity Checks:

If you have problems with this module login as administrator in Phorum's administrative interface and go to the "System Sanity Checks" section. Check for warnings or errors for the Mailing List Module.

The following checks are performed:

- Exists module settings?
- Exists default language file?
- Exists forum specific language file(s)?
- Custom language file(s) contains same array keys as the english file?
- Mailing list destinations are valid email addresses?
- Email FROM addresses are valid email addresses?


Changelog:

2008/04/01 version 1.0.0 by Oliver Riesen <oliver@riesen.org>
- Initial release for Phorum 5.2; some code in the settings page based on the "File List Module" from the Phorum developer Maurice Makaay.

2008/04/01 version 1.1.0 by Oliver Riesen <oliver@riesen.org>
- Handling moderated forums.

2008/04/01 version 1.1.1 by Oliver Riesen <oliver@riesen.org>
- Bug fix: Handling of multiple email addresses as destination.

2008/04/16 version 1.1.2 by Oliver Riesen <oliver@riesen.org>
- Copied that nice icons for folders and forums from Topic Poll Module.

2008/04/29 version 1.2.0 by Oliver Riesen <oliver@riesen.org>
- New option to send email without stripping HTML <tags> and BBcode [tags] from the body.

2008/05/12 version 1.3.0 by Oliver Riesen (oliver@riesen.org)
- German language files renamed according to structuring the language file and charset support.
- Added german language files with UTF-8 charset.

2008/09/26 version 1.4.0 by Oliver Riesen (oliver@riesen.org)
- The FROM address as sent to the mailing list can be configured for each forum. If the user chooses not to set a FROM address for a forum, then system email FROM address is used. Sanity check if email FROM addresses are valid email addresses. Thanks to Phil Driscoll (phil@dialsolutions.co.uk).

2010/05/28 version 1.5.0 by Oliver Riesen (oliver@riesen.org)
- In-reply-to and references headers added. Thanks to Phorum developer Thomas Seifert.

2010/06/22 version 1.5.1 by Oliver Riesen (oliver@riesen.org)
- When forum specific FROM addresses are used there are build now with the system_email_from_name according to the default behavior of Phorum.

2010/07/16 version 1.6.0 BETA by Oliver Riesen (oliver@riesen.org)
- Added support for sending attachments.

2015/08/28 version 1.6.1 by Oliver Riesen (oliver@riesen.org)
- Phorum 5.2.21 is required.
- Optionally stripping HTML and BBCode <tags> depends now on the new "How to
strip quotes in mails" setting in "General Settings".


Using Phorum since 7/2000: forum.langzeittest.de (actual version 5.2.23)
Modules "Made in Germany" for version 5.2: Author_as_Sender, CarCost, Close_Topic, Conceal_Message_Timestamp,
Format_Email, Index_Structure, Mailing_List, Pervasive_Forum, Spritmonitor, Terms_of_Service and German_Language_Files_Package.




Edited 10 time(s). Last edit at 08/31/2015 08:52AM by Oliver Riesen.


Attachments:
open | download - mailinglist-1.6.1.zip (13.6 KB)
open | download - mailinglist-1.6.1.tar.gz (9 KB)
Re: Module: Mailing List
April 01, 2008 06:27AM
Thanks for the module. I looked at the code and I think it's better to not use the hook "after_message_save" It's better to use the hooks "after_post" and "after_approve" for this. The after_approve hook would be required for handling moderated forums. The module currently does not support moderation.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Module: Mailing List
April 01, 2008 09:41AM
Hi Maurice,

Quote
mmakaay
The module currently does not support moderation.

we don't have moderated forums, but my module now supports them. I just uploaded a new version.

Changelog:

2008/04/01 version 1.1.0 by Oliver Riesen <oliver@riesen.org>
- Handling moderated forums.

Regards
Oliver


Using Phorum since 7/2000: forum.langzeittest.de (actual version 5.2.23)
Modules "Made in Germany" for version 5.2: Author_as_Sender, CarCost, Close_Topic, Conceal_Message_Timestamp,
Format_Email, Index_Structure, Mailing_List, Pervasive_Forum, Spritmonitor, Terms_of_Service and German_Language_Files_Package.
Re: Module: Mailing List
April 01, 2008 10:43AM
Thanks, that will make it more versatile and it will prevent for unpleasant surprises for those who run in moderated mode.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Module: Mailing List
April 29, 2008 10:16AM
New version 1.2.0:

2008/04/16 version 1.1.2 by Oliver Riesen <oliver@riesen.org> (never published)
- Copied that nice icons for folders and forums from Topic Poll Module.

2008/04/29 version 1.2.0 by Oliver Riesen <oliver@riesen.org>
- New option to send email without stripping HTML <tags> and BBcode [tags] from the body.

Regards
Oliver


Using Phorum since 7/2000: forum.langzeittest.de (actual version 5.2.23)
Modules "Made in Germany" for version 5.2: Author_as_Sender, CarCost, Close_Topic, Conceal_Message_Timestamp,
Format_Email, Index_Structure, Mailing_List, Pervasive_Forum, Spritmonitor, Terms_of_Service and German_Language_Files_Package.
Re: Module: Mailing List
May 12, 2008 04:45PM
New version 1.3.0:

2008/05/12 version 1.3.0 by Oliver Riesen (oliver@riesen.org)
- German language files renamed according to structuring the language file and charset support.
- Added german language files with UTF-8 charset.


Using Phorum since 7/2000: forum.langzeittest.de (actual version 5.2.23)
Modules "Made in Germany" for version 5.2: Author_as_Sender, CarCost, Close_Topic, Conceal_Message_Timestamp,
Format_Email, Index_Structure, Mailing_List, Pervasive_Forum, Spritmonitor, Terms_of_Service and German_Language_Files_Package.
Re: Module: Mailing List
August 05, 2008 02:47PM
Would this module integrate a forum with an existing majordomo mailing list?
Re: Module: Mailing List
August 05, 2008 03:14PM
Hi HummerNetwork,

Quote
HummerNetwork
Would this module integrate a forum with an existing majordomo mailing list?

Yes, why not? ;-) You just define for each forum an email address. Each time there is a new post in that forum, my module sends an additional email to that address which could be also a Majordomo mailing list.

Regards
Oliver


Using Phorum since 7/2000: forum.langzeittest.de (actual version 5.2.23)
Modules "Made in Germany" for version 5.2: Author_as_Sender, CarCost, Close_Topic, Conceal_Message_Timestamp,
Format_Email, Index_Structure, Mailing_List, Pervasive_Forum, Spritmonitor, Terms_of_Service and German_Language_Files_Package.
Re: Module: Mailing List
September 26, 2008 06:17AM
New version 1.4.0:

2008/09/26 version 1.4.0 by Oliver Riesen (oliver@riesen.org)
- The FROM address as sent to the mailing list can be configured for each
  forum. If the user chooses not to set a FROM address for a forum, then
  system email FROM address is used. Sanity check if email FROM addresses are
  valid email addresses. Thanks to Phil Driscoll (phil@dialsolutions.co.uk).


Using Phorum since 7/2000: forum.langzeittest.de (actual version 5.2.23)
Modules "Made in Germany" for version 5.2: Author_as_Sender, CarCost, Close_Topic, Conceal_Message_Timestamp,
Format_Email, Index_Structure, Mailing_List, Pervasive_Forum, Spritmonitor, Terms_of_Service and German_Language_Files_Package.
Re: Module: Mailing List
October 14, 2008 05:12AM
Great module to replace the "email all posts" module.

Just throwing out some ideas which would be nice, some (or all) may need support from the phorum core (or the future mail api ;)):

- using the poster's name in the from in some way to show the author (especially useful if its not mentioned in the message)
- adding the in-reply-to header to replies, to have it grouped with their previous message(s)
- sending out attachments too
- sending messages with both plain-text and html parts


Thomas Seifert
Sorry, only registered users may post in this forum.

Click here to login