Hiya,

I'm running PM on a closed site, the system relies on email notifications being sent out but for some reason they are not being sent at all. I'm not sure whether they leave a log entry when sent but they aren't on my site. I upgraded the module to the latest dev version but am having the same problem. Is there any way to actually check whether the modules is trying to send a message or not as without a log entry I'm not sure where it's breaking.

thanks for your help

Files: 
CommentFileSizeAuthor
#5 privatemsg-nonlevelslogic-1511398-5.patch1.08 KBfuzzy76
PASSED: [[SimpleTest]]: [MySQL] 3,816 pass(es).
[ View ]

Comments

Status:Active» Closed (cannot reproduce)

You can use the Devel module to log sent mail. Instructions here:
https://drupal.org/node/201981

If you can identify steps to reproduce this problem from a clean install of Drupal 6 and Privatemsg, please update this issue.

Actually, I'm seeing the same. But it only happens for users that have actually saved a preference of receiving mail (they have three lines in pm_setting, email_notify_level:1, email_notify_only_user:0, show_sender_mail:0

While users that do not have any lines in pm_setting will receive mail (as the default setting says).

Other mails from the site works fine. Sendmail logs shows no trace of any of the missing mails.

Status:Closed (cannot reproduce)» Active

Found it! pm_email_notify_user() does not handle users without the "set privatemsg e-mail notification level" permission properly. The form is created with a single checkbox without '#return_value' which returns 1 when checked. Then the submithandler proceeds to save that value in the database, instead of one of the "PM_EMAIL_NOTIFY_LEVEL_*" constants.

I can write a patch for it, but I am not sure I will have time until after Drupalcon Prague.

Assigned:Unassigned» fuzzy76
Status:Active» Needs review
StatusFileSize
new1.08 KB
PASSED: [[SimpleTest]]: [MySQL] 3,816 pass(es).
[ View ]

Attached patch fixes the problem. Rolled against head of the 6.x-2.x branch. The head was actually even more broken than our old dev-snapshot. It was impossible for users to disable emails at all without the 'set privatemsg e-mail notification level' permission.

Issue summary:View changes
Issue tags:+Needs tests

There have been way too many bugs around all that, really needs better test coverage.

Title:No email notifications being received (or sent according to the log) pm_email_notify_user() does not handle users without the "set privatemsg e-mail notification level" permission properly
Related issues:+#1908188: "Receive email notification for incoming private messages" settings does not save in account