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

John Bowling johnlb2002 at cox.net
Fri Sep 9 16:14:48 CDT 2011


On 09/09/2011 09:09 AM, John Bowling wrote:
> On 09/09/2011 12:18 AM, Petko Yotov wrote:
>> 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:
>>
>> <?php
>> $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
>>
>> https://secure.wikimedia.org/wikipedia/en/wiki/Sender_Policy_Framework
>>
>> Again, this is largely outside of a discussion about PmWiki.
>>
>> Good luck,
>> Petko
>
> The testmail.php output a Mail Sent, but with several tries noting was
> was received with Thunderbird. I am able to send emails from any of my
> accounts to any other of my accounts using Thunderbird with no problem.
>
> My next step is to update the copy on the host with recent changes in my
> localhost copy, and test it there.
>
> Thanks, John

When tried live on hosting site, it first gave me some errors that I 
fixed, and it now does send out an email.

What is sends is a link to the list of changes on the site. That link is 
the full link to the hosting's primary domain, which is masked when 
browsing to the site. That would be fine if I were the only person to 
get emails, but not to the site visitors. That's why it is masked.

This will require that I get the email, massage it to eliminate that 
link, for the potential dozens per day, and then forward the results to 
the appropriate people, expected somewhere between 40 and 75.

It also sends the message as:

  * Calendar.20110910 . . . September 09, 2011, at 11:53 AM MST by

which is fine up to a point. What I need is the body entered into that 
date to be included in the email.

So Notify is not going to work.

John




More information about the pmwiki-users mailing list