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 |
Assigned to Jan Schneider
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
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
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
https://github.com/horde/horde/commit/7b096cdc9b3257349c3508d2cc8ac1902be88beb
can you reproduce this issue with this informations?
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.
* 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;
things are failing. The mail is sent around line 614 .. $mail->send()
things are failing. The mail is sent around line 614 .. $mail->send()
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()
$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.
###########################################################################
$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.
whups 3.0.0 stable
horde 5.2.0 stable
New Attachment: 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"]
[...]
horde debug log.
Other than that, no idea.
name your states any way you like, but make sure that your
"Zugewiesen" state is of the state *category* "Assigned/Zugewiesen".
* State Name [ Zugewiesen ]
* State Description [ Someone has accepted responsibility for the ticket. ]
* State Category [ Assigned ]
your states any way you like, but make sure that your "Zugewiesen"
state is of the state *category* "Assigned/Zugewiesen".
New Attachment: send_reminder_whups.png
set to this state.
to this state.
New Attachment: customize_stats.png
If not, RC3 missing some git commits or I forget a config for send reminders?
State ⇒ Feedback
Priority ⇒ 1. Low
State ⇒ Unconfirmed
Patch ⇒ No
Milestone ⇒
Queue ⇒ Whups
Type ⇒ Bug
Summary ⇒ send reminder does not send mails
with "Reminders were sent.", but not one email were send.
No errors in the php error log.