From: Michael J. Rubinsky Date: Fri, 9 Apr 2010 22:50:34 +0000 (-0400) Subject: We need to implement SendMail: X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=bc1178e02d6c003c8f3b3ac9355be7cc86b2960a;p=horde.git We need to implement SendMail: Seems that some clients automatically call SendMail when creating a new appointment with attendees and send them a meeting invitation. Implement the request class, but the driver currently discards the email rec'd. Need to figure out what to do with this... --- diff --git a/framework/ActiveSync/lib/Horde/ActiveSync.php b/framework/ActiveSync/lib/Horde/ActiveSync.php index 06a682ac1..d4f1acc69 100644 --- a/framework/ActiveSync/lib/Horde/ActiveSync.php +++ b/framework/ActiveSync/lib/Horde/ActiveSync.php @@ -553,21 +553,6 @@ class Horde_ActiveSync * @param $protocolversion * @return unknown_type */ - public function handleSendMail($protocolversion) - { - // All that happens here is that we receive an rfc822 message on stdin - // and just forward it to the backend. We provide no output except for - // an OK http reply - $rfc822 = $this->readStream(); - - return $this->_driver->SendMail($rfc822); - } - - /** - * - * @param $protocolversion - * @return unknown_type - */ public function handleSmartForward($protocolversion) { // SmartForward is a normal 'send' except that you should attach the diff --git a/framework/ActiveSync/lib/Horde/ActiveSync/Driver/Base.php b/framework/ActiveSync/lib/Horde/ActiveSync/Driver/Base.php index 173077c35..1a545b680 100644 --- a/framework/ActiveSync/lib/Horde/ActiveSync/Driver/Base.php +++ b/framework/ActiveSync/lib/Horde/ActiveSync/Driver/Base.php @@ -423,6 +423,8 @@ abstract class Horde_ActiveSync_Driver_Base } /** + * @TODO + * * @param $rfc822 * @param $forward * @param $reply diff --git a/framework/ActiveSync/lib/Horde/ActiveSync/Request/SendMail.php b/framework/ActiveSync/lib/Horde/ActiveSync/Request/SendMail.php new file mode 100644 index 000000000..a2f34f3ca --- /dev/null +++ b/framework/ActiveSync/lib/Horde/ActiveSync/Request/SendMail.php @@ -0,0 +1,34 @@ + + * @package Horde_ActiveSync + */ +/** + * Zarafa Deutschland GmbH, www.zarafaserver.de + * This file is distributed under GPL v2. + * Consult LICENSE file for details + */ +class Horde_ActiveSync_Request_SendMail extends Horde_ActiveSync_Request_Base +{ + + /** + * + * @param $protocolversion + * @return unknown_type + */ + public function handle(Horde_ActiveSync $activeSync, $devId) + { + $this->_logger->info('[' . $devId . '] Handling SendMail command.'); + + // All that happens here is that we receive an rfc822 message on stdin + // and just forward it to the backend. We provide no output except for + // an OK http reply + $rfc822 = $this->_request->getBody(); + + return $this->_driver->SendMail($rfc822); + } +} \ No newline at end of file