[pmwiki-users] Sending emails when a calendar is updated

Petko Yotov 5ko at 5ko.fr
Fri Sep 9 02:18:30 CDT 2011

On Friday 09 September 2011 05:14:19, John Bowling wrote :
> On 09/08/2011 02:58 AM, Petko Yotov wrote:
> > On Wednesday 07 September 2011 03:14:01, John Bowling wrote :
> >> On 09/06/2011 10:01 AM, John Bowling wrote:
> >>> On 09/05/2011 01:37 PM, Petko Yotov wrote:
> >>>> http://www.pmwiki.org/wiki/PmWiki/Notify
> >> 
> >> I have not yet gotten any emails relating to the calendar entry
> >> changes.
> > 
> > Some hosting providers disable the mail() function of PHP to prevent
> > spam. If that is your case, unfortunately this is not something PmWiki
> > could fix.
> It is currently running in localhost on openSUSE 11.4, so that is not an
> issue.
> $NotifyList[] = 'notify=myname at cox.net group=Calendar home=Calendar
> squelch=30 delay=60';
> $NotifyFrom = 'myname at gmailcom';
> in config.php Both are valid, working addresses

There is no home= parameter. In case you don't have it already, you also need 
$EnableNotify = 1; Unless it is a typo in this message, '@gmailcom' is 
unlikely to be a valid server name on your local network: I suppose it is 
'@gmail.com' with a dot.

For testing purposes, I'd try Notify for the whole site and not only for one 
group: just to see if it works.

> > Alternatively, these messages could land in your Spam/Trash folder: you
> > may need to configure your email filters to let them through.
> Not easy to do without knowing what the subject will be. If I filter on
> just a from or to address, it will get a few hundred a day, and most of
> them are required for other things. Same with searching for
> miss-directed emails.

The default subject is '[$WikiTitle] recent notify posts' where $WikiTitle is 
what you defined in config.php. The 'From:' header will be what you set at the 
$NotifyFrom line.

> So it appears that there is no way to test if notify is working.

If you still haven't received a notify message, it is probably not working. 
I'd test if the mail() function works, for example, creating a file 
testmail.php containing such a code:

    $message = "Line 1\nLine 2\nLine 3";

    if ( mail('myname at cox.net', 'Mail from PHP at localhost', $message,
     "From: myname at gmail.com\r\n")) {
      echo "Mail sent<br/>";
    else  {
      echo "Mail NOT sent<br/>";

After calling this script with your browser on http://localhost/testmail.php, 
you'll see if your PHP installation can send a message, and if you receive it. 
If you do receive the message in your mailbox, the Nofity feature of PmWiki 
should work too. If you don't, there is a problem outside of PmWiki: contact 
your system administrator or check your documentation on how to enable sending 
e-mails from PHP.

(If your testmail.php file says "Mail sent" but you don't receive the message) 
More and more email servers silently discard any direct mail from personal 
computers like localhost, again to prevent spam. If you control a domain name, 
you could whitelist your personal IP address in order to send emails with a 
From: address on that domain, see


Again, this is largely outside of a discussion about PmWiki.

Good luck,

More information about the pmwiki-users mailing list