%audience% administrators (basic) <<|[[PmWiki.Variables]]|>> ->%note% As of PmWiki 2.1.7, the MailPosts capability is being superceded by the more advanced ''notify.php'' script. See [[Notify]] for details. The ''mailposts.php'' script allows a site administrator to configure PmWiki to send email messages whenever pages are changed on the wiki site. MailPosts can be configured so that multiple page changes over a short period of time are combined into a single email message (to avoid flooding a mailbox). The MailPosts feature is especially useful for sites that have infrequent updates, eliminating the need to frequently check [=RecentChanges=] pages just to see if anything has changed. Full configuration details are available in ''scripts/mailposts.php''. Below is a brief synopsis of what needs to go in '''config.php''' or a per-group customization script for MailPosts: > :$EnableMailPosts:Tells ''stdconfig.php'' to enable the [[MailPosts]] script. $EnableMailPosts = 1; # enable mailposts $EnableMailPosts = 0; # disable mailposts :$MailPostsTo:A comma separated list of email recipients. $MailPostsTo = 'admin@example.com, joe@somewhere.org'; :$MailPostsFrom:Return email address to be used in the sent email. $MailPostsFrom = 'wiki@example.com'; $MailPostsFrom = 'Wiki server '; :$MailPostsDelay:The length of time (seconds) to wait before sending mail after the first post. Defaults to zero - posts are sent as soon as the $MailPostsSquelch period has expired. $MailPostsDelay = 360; # send mail 6+ min after first post :$MailPostsSquelch:The minimum length of time (seconds) that must elapse between sending mail messages. Useful when $MailPostsDelay is set to a small value to keep the number of mail notification messages down. Defaults to 7200 (two hours). $MailPostsSquelch = 43200; # wait 12+ hours between mailings :$MailPostsItemFmt:The text to be sent for each changed item in the post. The string "$PostTime" is substituted with the time of the post (controlled by $MailPostsTimeFmt below). # default $MailPostsItemFmt = ' * $FullName . . . $PostTime by $Author'; # include the page's URL in the message $MailPostsItemFmt = " * \$FullName . . . \$PostTime by \$Author\n \$PageUrl"; :$MailPostsTimeFmt:The format for dates/times in $PostTime above. Defaults to the value of $TimeFmt. $MailPostsTimeFmt = '%Y-%m-%d %H:%M'; # 2004-03-20 17:44 :$MailPostsMessage:The body of the message to be sent. The string "$MailPostsList" is replaced with the list of posts (as formatted by $MailPostsItemFmt above). :$MailPostsSubject:The subject line of the mail to be sent. :$MailPostsHeaders:String of extra mail headers to be passed to the mail() function. :$MailPostsFunction:Name of the function to be called to send the mail. Defaults to using PHP's built-in @@[[http://www.php.net/mail | mail()]]@@ function, but some systems may not be configured correctly. Can be set to [='MailPostsSendmail'=] to explicitly call ''/usr/lib/sendmail''. # call /usr/lib/sendmail directly instead of using mail() $MailPostsFunction = [='MailPostsSendmail'=]; :$MailPostsFile:The scratch file where MailPosts keeps track of recent posting information. Defaults to @@[="$WikiDir/.mailposts"=]@@. Note that this file must generally be writable by the webserver process. Discussion that was here has been moved to [[PmWiki:MailPosts-Discussion]]. %trail% <<|[[DocumentationIndex]]|>>