コード例 #1
0
 /**
  * @return Tracker_Artifact_MailGateway_RecipientFactory
  */
 protected function getRecipientFactory()
 {
     return Tracker_Artifact_MailGateway_RecipientFactory::build();
 }
コード例 #2
0
ファイル: emailgateway.php プロジェクト: rinodung/tuleap
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * Tuleap is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Tuleap. If not, see <http://www.gnu.org/licenses/>.
 */
require 'pre.php';
$fd = fopen("php://stdin", "r");
$raw_mail = "";
while (!feof($fd)) {
    $raw_mail .= fread($fd, 1024);
}
fclose($fd);
$logger = new BackendLogger();
$logger->info("Entering email gateway");
$recipient_factory = Tracker_Artifact_MailGateway_RecipientFactory::build();
$parser = new Tracker_Artifact_MailGateway_Parser($recipient_factory);
$citation_sripper = new Tracker_Artifact_MailGateway_CitationStripper();
$mailgateway = new Tracker_Artifact_MailGateway_MailGateway($parser, $citation_sripper, $logger);
try {
    $mailgateway->process($raw_mail);
} catch (Exception $e) {
    $logger->error($e->getMessage());
}
$logger->info("End email gateway");