6.0.0-beta1
7/4/25

[#12867] send reminder does not send mails
Summary send reminder does not send mails
Queue Whups
Queue Version 3.0.0RC3
Type Bug
State Resolved
Priority 1. Low
Owners jan (at) horde (dot) org
Requester samuel.wolf (at) wolf-maschinenbau (dot) de
Created 11/27/2013 (4237 days ago)
Due
Updated 12/04/2014 (3865 days ago)
Assigned 11/28/2013 (4236 days ago)
Resolved 12/04/2014 (3865 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
12/04/2014 01:28:45 PM Jan Schneider State ⇒ Resolved
 
11/25/2014 05:14:33 PM samuel (dot) wolf (at) wolf-maschinenbau (dot) de Comment #28 Reply to this comment
Does this fix it?
Yes, thanks!
11/25/2014 04:43:49 PM Jan Schneider Comment #27
Assigned to Jan Schneider
Reply to this comment
Does this fix it?
11/25/2014 04:43:19 PM Git Commit Comment #26 Reply to this comment
Changes have been made in Git (FRAMEWORK_5_2):

commit 390d98c1eb357a8c602627a01eb5add9d3e8e109
Author: Jan Schneider <jan@horde.org>
Date:   Tue Nov 25 17:43:52 2014 +0100

     [jan] Fix sending reminders (Bug #12867).

  whups/docs/CHANGES |    1 +
  whups/package.xml  |    4 ++--
  2 files changed, 3 insertions(+), 2 deletions(-)

http://github.com/horde/horde/commit/390d98c1eb357a8c602627a01eb5add9d3e8e109
11/25/2014 04:43:12 PM Git Commit Comment #25 Reply to this comment
Changes have been made in Git (FRAMEWORK_5_2):

commit 6b9b264b8d12e92bbe5fc6c38a708575a0392aa6
Author: Jan Schneider <jan@horde.org>
Date:   Tue Nov 25 17:39:38 2014 +0100

     Fix sending reminders (Bug #12867).

  whups/lib/Driver.php |    5 ++++-
  1 files changed, 4 insertions(+), 1 deletions(-)

http://github.com/horde/horde/commit/6b9b264b8d12e92bbe5fc6c38a708575a0392aa6
11/25/2014 04:38:58 PM Git Commit Comment #24 Reply to this comment
Changes have been made in Git (master):

commit 56a7df71748c069f9e8186aca860a4cfcf4160f4
Author: Jan Schneider <jan@horde.org>
Date:   Tue Nov 25 17:39:38 2014 +0100

     Fix sending reminders (Bug #12867).

  whups/lib/Driver.php |    5 ++++-
  1 files changed, 4 insertions(+), 1 deletions(-)

http://github.com/horde/horde/commit/56a7df71748c069f9e8186aca860a4cfcf4160f4
11/25/2014 04:06:09 PM Jan Schneider Comment #23 Reply to this comment
Commit 7b096cdc9b3257349c3508d2cc8ac1902be88beb is the culprit.
https://github.com/horde/horde/commit/7b096cdc9b3257349c3508d2cc8ac1902be88beb
11/25/2014 02:30:00 PM samuel (dot) wolf (at) wolf-maschinenbau (dot) de Comment #22 Reply to this comment
@ Jan,

can you reproduce this issue with this informations?
10/14/2014 01:07:38 PM guenter (at) zamia (dot) org Comment #21 Reply to this comment
we just investigated this a bit further: problem seems to originate in 
this if-statement (Driver.php:515)

             if ($details && $details['type'] == 'user') {
                 $user_prefs = $GLOBALS['injector']
                     ->getInstance('Horde_Core_Factory_Prefs')
                     ->create('whups', array('user' => $details['user']));
                 if ($from['type'] == 'user' &&
                     $details['user'] == $from['user'] &&
                     $user_prefs->getValue('email_others_only')) {
                     continue;
                 }
             }

if we set email_others_only to 0, reminders are being sent. if we 
leave it to (default) 1, reminders are skipped because 
$details['user'] == $from['user']. this seems to originate from 
Whoups.php:960:

             $whups_driver->mail(array('recipients' => array($user => 'owner'),
                                       'subject' => $subject,
                                       'view' => $view,
                                       'template' => $message_file,
                                       'from' => $user));

where the same user is set in the recipients list as in the from field.


10/13/2014 05:44:36 PM samuel (dot) wolf (at) wolf-maschinenbau (dot) de Comment #20 Reply to this comment
whups/lib/Driver.php
             /* We may have no recipients due to users excluding themselves
              * from self notifies. */
             if (!$to) {
                 continue;
             }
             if ($details && $details['type'] == 'user') {
                 $user_prefs = $GLOBALS['injector']
                     ->getInstance('Horde_Core_Factory_Prefs')
                     ->create('whups', array('user' => $details['user']));
                 if ($from['type'] == 'user' &&
                     $details['user'] == $from['user'] &&
                     $user_prefs->getValue('email_others_only')) {
                       Horde::debug($from);
                        mail('samuel.wolf@wolf-maschinenbau.de','test--1', 
'nachrichttext');
                     continue;
                 }
             }
             mail('samuel.wolf@wolf-maschinenbau.de','test--2', 
'nachrichttext');
             if ($opts['ticket']) {
                 /* Add attachments. */


I receive "test--1", but never "test--2".


Horde Debug:

2014-10-13T19:28:18+02:00 DEBUG: Variable information:
array(4) {
   ["user"]=>
   string(11) "samuel.wolf"
   ["type"]=>
   string(4) "user"
   ["name"]=>
   string(11) "Samuel Wolf"
   ["email"]=>
   object(Horde_Mail_Rfc822_Address)#607 (4) {
     ["comment"]=>
     array(0) {
     }
     ["mailbox"]=>
     string(11) "samuel.wolf"
     ["_host":protected]=>
     string(20) "wolf-maschinenbau.de"
     ["_personal":protected]=>
     NULL
   }
}

../whups/config/prefs.local.php
$_prefs['email_others_only']['value'] = 1;
10/13/2014 01:21:23 PM Michael Rubinsky Comment #19 Reply to this comment
Anyway, next you should look in Whups_Driver::mail() to see where
things are failing. The mail is sent around line 614 .. $mail->send()
In which file?
whups/lib/Driver.php
10/13/2014 08:23:59 AM samuel (dot) wolf (at) wolf-maschinenbau (dot) de Comment #18 Reply to this comment
Anyway, next you should look in Whups_Driver::mail() to see where 
things are failing. The mail is sent around line 614 .. $mail->send()
In which file?
10/12/2014 09:46:50 PM Michael Rubinsky Comment #17 Reply to this comment

[Show Quoted Text - 13 lines]
Your install may, or may not be using PHP's mail() function - it 
depends on the transport you have configured.

Anyway, next you should look in Whups_Driver::mail() to see where 
things are failing. The mail is sent around line 614 .. $mail->send()
10/12/2014 11:43:45 AM samuel (dot) wolf (at) wolf-maschinenbau (dot) de Comment #16 Reply to this comment
$view->tickets = $utickets;
$subject = _("Reminder: Your open tickets");

Horde::debug($subject);
mail('samuel.wolf@wolf-maschinenbau.de','test', 'nachrichttext');

$whups_driver->mail(array('recipients' => array($user => 'owner'),
                                       'subject' => $subject,
                                       'view' => $view,
                                       'template' => $message_file,
                                       'from' => $user));

PHP mail work, I receive the test mail.
10/11/2014 05:04:35 PM samuel (dot) wolf (at) wolf-maschinenbau (dot) de Comment #15 Reply to this comment
The sending is done in Whups::sendReminders(), in lib/Whups.php
Add debug info in Whups.php:
###########################################################################
             $view->tickets = $utickets;
             $subject = _("Reminder: Your open tickets");
             $whups_driver->mail(array('recipients' => array($user => 'owner'),
                                       'subject' => $subject,
                                       'view' => $view,
                                       'template' => $message_file,
                                       'from' => $user));

             Horde::debug($subject);
###########################################################################

horde_debug.txt show then:
###########################################################################
2014-10-11T18:51:45+02:00 DEBUG: Variable information:
string(32) "Erinnerung: Ihre offenen Tickets"

Backtrace:
1. Whups::sendReminders() /var/www/https/horde/whups/admin/index.php:1133
2. Horde::debug() /var/www/https/horde/whups/lib/Whups.php:974

2014-10-11T18:51:45+02:00 DEBUG: Variable information:
string(32) "Erinnerung: Ihre offenen Tickets"

Backtrace:
1. Whups::sendReminders() /var/www/https/horde/whups/admin/index.php:1133
2. Horde::debug() /var/www/https/horde/whups/lib/Whups.php:974

[...]
###########################################################################

I guess that is the output we like to see and the problem is somewhere else.
Is there a way to pass the mail array into horde_debug.txt?

Whats the next step?

Note: Send mail on ticket creation/edit works.
08/01/2014 09:30:29 PM Jan Schneider Comment #14 Reply to this comment
The sending is done in Whups::sendReminders(), in lib/Whups.php
08/01/2014 03:17:14 PM samuel (dot) wolf (at) wolf-maschinenbau (dot) de Comment #13 Reply to this comment
Is there a point to start track down this issue?
whups 3.0.0 stable
horde 5.2.0 stable
12/06/2013 10:10:56 AM Jan Schneider Comment #12 Reply to this comment
Those are harmless PHP notices.
12/05/2013 10:26:24 PM samuel (dot) wolf (at) wolf-maschinenbau (dot) de Comment #11
New Attachment: horde_debug.log
Reply to this comment
better to read...
12/05/2013 10:24:33 PM samuel (dot) wolf (at) wolf-maschinenbau (dot) de Comment #10 Reply to this comment
Horde DEBUG log:
[...]
2013-12-05T23:17:45+01:00 DEBUG: HORDE [whups] PHP ERROR: Declaration 
of Horde_Form_Type_invalid::init() should be compatible with 
Horde_Form_Type::init() [pid 24373 on line 3839 of 
"/usr/share/php/Horde/Form/Type.php"]
2013-12-05T23:17:45+01:00 DEBUG: HORDE [whups] PHP ERROR: Declaration 
of Horde_Form_Type_country::init() should be compatible with 
Horde_Form_Type::init() [pid 24373 on line 908 of 
"/usr/share/php/Horde/Form/Type.php"]
2013-12-05T23:17:45+01:00 DEBUG: HORDE [whups] SQL  (0.0001s)
[...]
2013-12-05T23:17:45+01:00 DEBUG: HORDE [whups] PHP ERROR: Only 
variables should be assigned by reference [pid 24373 on line 47 of 
"/var/www/https/horde4/whups/lib/Form/SendReminder.php"]
[...]
2013-12-05T23:17:45+01:00 DEBUG: HORDE [whups] SQL  (0.0000s)
         SELECT ticket_id as id, ticket_owner as owner FROM whups_ticket_owners
           WHERE ticket_id = 723 [pid 24373 on line 319 of 
"/usr/share/php/Horde/Db/Adapter/Mysqli.php"]
2013-12-05T23:17:45+01:00 DEBUG: HORDE [whups] Reminders were sent. 
[pid 24373 on line 27 of 
"/usr/share/php/Horde/Core/Notification/Handler/Decorator/Hordelog.php"]
2013-12-05T23:17:45+01:00 DEBUG: HORDE [whups] SQL  (0.0004s)
[...]
2013-12-05T23:17:45+01:00 DEBUG: HORDE [whups] PHP ERROR: Only 
variables should be assigned by reference [pid 24373 on line 201 of 
"/usr/share/php/Horde/Form/Renderer.php"]
2013-12-05T23:17:45+01:00 DEBUG: HORDE [whups] PHP ERROR: Only 
variables should be assigned by reference [pid 24373 on line 232 of 
"/usr/share/php/Horde/Form/Renderer.php"]
2013-12-05T23:17:45+01:00 DEBUG: HORDE [whups] PHP ERROR: Only 
variables should be assigned by reference [pid 24373 on line 201 of 
"/usr/share/php/Horde/Form/Renderer.php"]
2013-12-05T23:17:45+01:00 DEBUG: HORDE [whups] PHP ERROR: Only 
variables should be assigned by reference [pid 24373 on line 232 of 
"/usr/share/php/Horde/Form/Renderer.php"]
2013-12-05T23:17:45+01:00 DEBUG: HORDE [whups] Max memory usage: 
20185088 bytes [pid 24373 on line 598 of 
"/usr/share/php/Horde/Registry.php"]
[...]
11/29/2013 01:04:14 PM samuel (dot) wolf (at) wolf-maschinenbau (dot) de Comment #9 Reply to this comment
I assume the assignee has an email address set in his preferences?
Yes ;-)
Other than that, no idea.
Will debug it on the weekend, maybe there some more information in the 
horde debug log.
11/29/2013 11:59:28 AM Jan Schneider Comment #8 Reply to this comment
I assume the assignee has an email address set in his preferences? 
Other than that, no idea.
11/29/2013 10:57:42 AM samuel (dot) wolf (at) wolf-maschinenbau (dot) de Comment #7 Reply to this comment
There's a difference between states and state categories. You can 
name your states any way you like, but make sure that your 
"Zugewiesen" state is of the state *category* "Assigned/Zugewiesen".
That is not the problem:
* State Name [ Zugewiesen ]
* State Description [ Someone has accepted responsibility for the ticket. ]
* State Category [ Assigned ]
11/29/2013 10:43:28 AM Jan Schneider Comment #6 Reply to this comment
There's a difference between states and state categories. You can name 
your states any way you like, but make sure that your "Zugewiesen" 
state is of the state *category* "Assigned/Zugewiesen".
11/29/2013 10:26:54 AM samuel (dot) wolf (at) wolf-maschinenbau (dot) de Comment #5
New Attachment: send_reminder_whups.png Download
Reply to this comment
You need states of the category "Assigned" and tickets need to be 
set to this state.
In my case "Zugewiesen", it work definitely in early versions RC1 or Beta.

11/29/2013 10:11:21 AM Jan Schneider Comment #4 Reply to this comment
You need states of the category "Assigned" and tickets need to be set 
to this state.
11/28/2013 04:59:19 PM samuel (dot) wolf (at) wolf-maschinenbau (dot) de Comment #3
New Attachment: customize_stats.png Download
Reply to this comment
Cannot reproduces, reminders are sent to assignees instantly here.
Is it a problem that we customize the stats?
If not, RC3 missing some git commits or I forget a config for send reminders?

11/28/2013 11:08:09 AM Jan Schneider Comment #2
State ⇒ Feedback
Reply to this comment
Cannot reproduces, reminders are sent to assignees instantly here.
11/27/2013 11:31:10 AM samuel (dot) wolf (at) wolf-maschinenbau (dot) de Comment #1
Priority ⇒ 1. Low
State ⇒ Unconfirmed
Patch ⇒ No
Milestone ⇒
Queue ⇒ Whups
Type ⇒ Bug
Summary ⇒ send reminder does not send mails
Reply to this comment
If I send reminders for a selected queue the notification comes up 
with "Reminders were sent.", but not one email were send.
No errors in the php error log.

Saved Queries