====== groupmail Plugin ======
---- plugin ----
description: A mailing list
author : David Cabernel
email : dcabernel@gmail.com
type : syntax
lastupdate : 2020-04-03
compatible : Greebo, Detritus
depends :
conflicts : contactmodern
similar : contact, contactmodern, recommend
tags : groups, email, archiving, groupmail
downloadurl: https://github.com/POpus/dokuwiki-groupmail/archive/master.zip
bugtracker : https://github.com/POpus/dokuwiki-groupmail/issues
sourcerepo : https://github.com/POpus/dokuwiki-groupmail
screenshot_img :
----
Note : this plugin has some elements that has been fixed [[https://github.com/luffah/dokuwiki-groupmail|in a fork awaiting PR to be accepted]] (fix sending of multiples emails; add security — only authorized groups can use the mailer; add a title to the form) //Merged Dec 18/2020//
===== Description =====
This plugin provides a simple email form which allows the user to send email to preconfigured recipients with archiving functionality of the sent emails.
Email recipients can be a list of
* email addresses
* registered dokuwiki users
* the members of dokuwiki groups
* recipients can be sent directly **to**, or **cc** and/or **bcc**
This allows one to use DokuWiki as a mailing list for a wiki group.
===== Installation =====
Search and install the plugin using the [[plugin:extension|Extension Manager]]. Refer to [[:Plugins]] on how to install plugins manually.
===== Examples/Usage =====
The easiest use is as follows
{{groupmail>}}
by which you create an email send form on your wiki page. When send is hit, the message will be delivered to the default recipient as configured in the configuration panel, while archiving each mail in the preconfigured log file.
A more complex example
{{groupmail>touser=dokuuser|autofrom|sendlog=:groupmail:mylog}
[[:groupmail:mylog|See old messages]]
creates an email form without name and sender email input field, which are automatically populated from the user being logged in. The sent emails are then saved in ''%%:groupmail:mylog%%'', to which a link is provided after the form.
===== Syntax =====
Basic syntax:
{{groupmail>action}}
* **action** can be a ''%%|%%'' separated list of:
* //autofrom// --- use sender identity from current user
* //subject=...// --- specify the email subject
* //content=...// --- preinsert content in the email body
* //toemail=...// --- comma-separated list of recipient email addresses
* //touser=...// --- comma-separated list of recipient registered users of the dokuwiki
* //togroup=...// --- comma-separated list of dokuwiki groups
* //ccemail=...// --- comma-separated list of recipient email addresses
* //ccuser=...// --- comma-separated list of recipient registered users of the dokuwiki
* //ccgroup=...// --- comma-separated list of dokuwiki groups
* //bccemail=...// --- comma-separated list of recipient email addresses
* //bccuser=...// --- comma-separated list of recipient registered users of the dokuwiki
* //bccgroup=...// --- comma-separated list of dokuwiki groups
===== Configuration and Settings =====
The plugin can be configured with the following options via the configuration tool:
* %%$conf['default'] = 'default@example.com';%% -- the default recipient of the emails.
* %%$conf['sendlog'] = ':groupmail:log';%% -- where sent emails are archived.
* %%$conf['captcha'] = 0;%% -- turn on/off captcha
* %%$conf['recaptchakey'] = '';%%
* %%$conf['recaptchasecret'] = '';%%
* %%$conf['recaptchalayout'] = 'red';%%
===== Tips and Tricks =====
In conjunction with [[plugin:tabinclude|Tabinclude Plugin]] and [[plugin:groupusers|groupusers plugin]] one can build a nice tab'ed email widget:
{{tabinclude>:mail:send|Send Mail,:mail:log|Mail Archive,:mail:list|Mailing List}}
===== Change Log =====
* **2020-04-03** Luffah
* bug with multiple bccgroup
* lint / simplify code (use mail_isvalid from dokuwiki core; add generic functions to validate fields and extract emails)
* **2018-12-06**
* bug fixed with **bccgroup**
* **2018-11-30**
* added **cc** and **bcc** parameters with same functionality as **to**. i.e. ccmail, bccuser etc
* **2018-06-26**
* Fixed to work with PHP7
* Transferred from bzfwunde to dcabernel
* **2015-09-27**
* Initial release
===== Known Bugs and Issues =====
* Only german and english are fully translated
* Captcha -- Inherited from [[plugin:contactmodern]] which this plugin was derived from:
* Only one contact form per page accepts reCaptcha.
* REcaptcha often doesn't load of conflicts
===== Discussion =====