1: <?php
2: /**
3: * Handle SmartReply requests.
4: *
5: * Logic adapted from Z-Push, original copyright notices below.
6: *
7: * Copyright 2009-2012 Horde LLC (http://www.horde.org/)
8: *
9: * @author Michael J. Rubinsky <mrubinsk@horde.org>
10: * @package ActiveSync
11: */
12: /**
13: * Zarafa Deutschland GmbH, www.zarafaserver.de
14: * This file is distributed under GPL-2.0.
15: * Consult COPYING file for details
16: */
17: class Horde_ActiveSync_Request_SmartReply extends Horde_ActiveSync_Request_Base
18: {
19: /**
20: * Handle request
21: *
22: * @return boolean
23: */
24: public function handle()
25: {
26: // Smart reply should add the original message to the end of the message body
27: $rfc822 = $this->readStream();
28:
29: if (isset($_GET["ItemId"])) {
30: $orig = $_GET["ItemId"];
31: } else {
32: $orig = false;
33: }
34:
35: if (isset($_GET["CollectionId"])) {
36: $parent = $_GET["CollectionId"];
37: } else {
38: $parent = false;
39: }
40:
41: return $this->_driver->sendMail($rfc822, false, $orig, $parent);
42: }
43: }