[pmwiki-users] Using different $MailPostsTo values

Patrick R. Michaud pmichaud at pobox.com
Mon Jun 20 15:40:28 CDT 2005


On Fri, Jun 03, 2005 at 05:38:27PM +0200, PyG wrote:
> 
> On my (wonderfull) PmWiki, I'm using different groups :
> GroupA/Foo
> GroupB/Foo
> 
> in my local/config.php, I use :
> $MailPostsTo = "admin at me.com";
> so every modifications are sent to me
> 
> And I use, for example in /local/GroupA.php
> $MailPostsTo .= ", adminOfGroupA at hismail.com";
> 
> So I hoped that modifications into GroupA will be sent to admin at me.com and 
> adminOfGroupA at hismail.com
> This work fine, except that if someone is visiting GroupB, modifications 
> (containing modifications of GroupA) will only be sent to admin at me.com

Alas, as you discovered, this doesn't work, or at least not in
this way.  The problem is that the $MailPostsTo variable is evaluated
at the time the mail is sent, not when the change is made.

However, there's hope -- if you tell each group to use a different
$MailPostsFile, such that GroupA.php contains:

    $MailPostsTo .= ", adminOfGroupA at hismail.com";
    $MailPostsFile = "$WorkDir/.mailposts-groupa";

then adminOfGroupA will only receive notifications about GroupA changes.
Notably, GroupA changes will only be sent when someone views a GroupA
page, too.

Pm



More information about the pmwiki-users mailing list