Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Fix Mailer
Browse files Browse the repository at this point in the history
  • Loading branch information
cdujeu committed Jun 24, 2016
1 parent 8d2ac44 commit 0eceb18
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 11 deletions.
6 changes: 2 additions & 4 deletions core/src/plugins/access.ajxp_conf/ConfAccessDriver.php
Expand Up @@ -3190,8 +3190,6 @@ public static function availableDriversToXML($filterByTagName = "", $filterByDri
/**
* @param ContextInterface $ctx
*/
protected function initRepository(ContextInterface $ctx)
{
// TODO: Implement initRepository() method.
protected function initRepository(ContextInterface $ctx){
}
}
}
6 changes: 3 additions & 3 deletions core/src/plugins/access.inbox/InboxAccessDriver.php
Expand Up @@ -161,9 +161,9 @@ public static function getNodes(ContextInterface $parentContext, $checkStats = f
$repoId = $repo->getId();

// DISABLE REMOTE SHARE FOR TESTING
// if(strpos($repoId, "ocs_remote_share_") === 0){
// continue;
// }
if(strpos($repoId, "ocs_remote_share_") === 0){
continue;
}

if(strpos($repoId, "ocs_remote_share_") !== 0){
$touchReposIds[] = $repoId;
Expand Down
2 changes: 1 addition & 1 deletion core/src/plugins/access.inbox/InboxAccessWrapper.php
Expand Up @@ -411,7 +411,7 @@ public function stream_write($data)
*/
public function unlink($path)
{
// TODO: Implement unlink() method.
// Do nothing
}

/**
Expand Down
5 changes: 3 additions & 2 deletions core/src/plugins/core.mailer/Mailer.php
Expand Up @@ -433,6 +433,7 @@ protected function sendMailImpl(ContextInterface $ctx, $recipients, $subject, $b
public function sendMailAction(\Psr\Http\Message\ServerRequestInterface &$requestInterface, \Psr\Http\Message\ResponseInterface &$responseInterface)
{
$mess = LocaleService::getMessages();
/** @var ContextInterface $ctx */
$ctx = $requestInterface->getAttribute("ctx");
$mailers = PluginsService::getInstance($ctx)->getActivePluginsForType("mailer");
if (!count($mailers)) {
Expand All @@ -446,8 +447,8 @@ public function sendMailAction(\Psr\Http\Message\ServerRequestInterface &$reques
//$toGroups = explode(",", $httpVars["groups_ids"]);
$toUsers = $httpVars["emails"];

$emails = $this->resolveAdresses($requestInterface->getAttribute("ctx"), $toUsers);
$from = $this->resolveFrom($httpVars["from"]);
$emails = $this->resolveAdresses($ctx, $toUsers);
$from = $this->resolveFrom($ctx, $httpVars["from"]);
$imageLink = isSet($httpVars["link"]) ? $httpVars["link"] : null;

$subject = $httpVars["subject"];
Expand Down
2 changes: 1 addition & 1 deletion core/src/plugins/mailer.phpmailer-lite/PhpMailLite.php
Expand Up @@ -57,7 +57,7 @@ protected function sendMailImpl(ContextInterface $ctx, $recipients, $subject, $b
$mail = new PHPMailerLite(true);
$mail->Mailer = $this->getContextualOption(Context::emptyContext(), "MAILER");
$mail->Sendmail = $this->getContextualOption(Context::emptyContext(), "SENDMAIL_PATH");
$from = $this->resolveFrom($from);
$from = $this->resolveFrom($ctx, $from);
if (!is_array($from) || empty($from["adress"])) {
throw new Exception("Cannot send email without a FROM address. Please check your core.mailer configuration.");
}
Expand Down

0 comments on commit 0eceb18

Please sign in to comment.