[TikiWiki-commits] [Git][tikiwiki/tiki][master] [KIL] Remove POP3 support from mail accounts
"ushindi bienvenu \(@usbbush\) via TikiWiki-cvs" <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <6a8f1a6486c28_3818d9b89587@gitlab-sidekiq-low-urgency-cpu-bound-v2-65ff88dfd7-68kwd.mail> |
ushindi bienvenu pushed to branch master at Tiki Wiki CMS Groupware / Tiki
Commits:
1b9e1598 by ushindi bienvenu at 2026-08-26T16:38:56+00:00
[KIL] Remove POP3 support from mail accounts
---
* Remove POP3 support from mail accounts
See merge request tikiwiki/tiki!11067
- - - - -
4 changed files:
- lib/core/Tiki/MailIn/Account.php
- lib/core/Tiki/MailIn/Action/RecipientPlaceholderFactory.php
- − lib/core/Tiki/MailIn/Source/Pop3.php
- tiki-mailin-code.php
Changes:
=====================================
lib/core/Tiki/MailIn/Account.php
=====================================
@@ -6,9 +6,11 @@
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
namespace Tiki\MailIn;
+use Exception;
use Language;
use TikiLib;
use TikiMail;
+use Tiki\MailIn\Exception\MailInException;
use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException;
class Account
@@ -29,13 +31,15 @@ class Account
private $trackerId;
private $preferences;
- private static function getSource(array $acc)
+ /**
+ * @throws Exception
+ */
+ private static function getSource(array $acc): Source\Imap
{
if ($acc['protocol'] == 'imap') {
return new Source\Imap($acc['host'], $acc['port'], $acc['username'], $acc['pass']);
- } else {
- return new Source\Pop3($acc['host'], $acc['port'], $acc['username'], $acc['pass']);
}
+ throw new Exception(tr('Unsupported mail protocol: %0', $acc['protocol']));
}
public function getPreferences()
@@ -54,6 +58,9 @@ class Account
return $source->test();
}
+ /**
+ * @throws Exception
+ */
public static function fromDb(array $acc)
{
$account = new self();
@@ -71,7 +78,7 @@ class Account
$account->actionFactory = $provider->getActionFactory($acc);
} catch (ServiceNotFoundException $e) {
- throw new Exception\MailInException("Action factory not found.");
+ throw new MailInException("Action factory not found.");
}
$account->accountAddress = $acc['account'];
=====================================
lib/core/Tiki/MailIn/Action/RecipientPlaceholderFactory.php
=====================================
@@ -8,7 +8,6 @@ namespace Tiki\MailIn\Action;
use Tiki\MailIn\Account;
use Tiki\MailIn\Source\Message;
-use Tiki\MailIn\Exception\MailInException;
class RecipientPlaceholderFactory implements FactoryInterface
{
=====================================
lib/core/Tiki/MailIn/Source/Pop3.php deleted
=====================================
@@ -1,62 +0,0 @@
-<?php
-
-// (c) Copyright by authors of the Tiki Wiki CMS Groupware Project
-//
-// All Rights Reserved. See copyright.txt for details and a complete list of authors.
-// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
-namespace Tiki\MailIn\Source;
-
-use ZBateson\MailMimeParser\MailMimeParser;
-
-/**
- * @deprecated This class is deprecated and will be removed after Tiki30LTS.
- * POP3 access is no longer supported in Tiki.
- */
-class Pop3 implements SourceInterface
-{
- protected $host;
- protected $port;
- protected $username;
- protected $password;
- protected $ssl;
- protected $novalidatecert;
- private $mailMimeParser;
-
- public function __construct($host, $port, $username, $password, $ssl = false, $novalidatecert = false)
- {
- trigger_error(__CLASS__ . ' is deprecated and will be removed after Tiki30LTS. POP3 access is no longer supported in Tiki.', E_USER_DEPRECATED);
- $this->host = $host;
- $this->port = (int) $port;
- $this->username = $username;
- $this->password = $password;
- $this->ssl = $ssl;
- $this->novalidatecert = $novalidatecert;
-
- $this->mailMimeParser = new MailMimeParser();
- }
-
- public function test()
- {
- trigger_error(__CLASS__ . ' is deprecated and no longer functional.', E_USER_DEPRECATED);
- return false;
- }
-
- public function getMessages()
- {
- trigger_error(__CLASS__ . ' is deprecated and no longer functional. getMessages() will return no results.', E_USER_DEPRECATED);
- }
-
- protected function connect()
- {
- trigger_error(__CLASS__ . ' is deprecated and connect() is no longer supported.', E_USER_DEPRECATED);
- }
-
- /**
- * @param $message Message
- * @param $zbMessage
- */
- private function handleAttachments($message, $zbMessage)
- {
- trigger_error(__CLASS__ . ' is deprecated and attachment handling is no longer functional.', E_USER_DEPRECATED);
- }
-}
=====================================
tiki-mailin-code.php
=====================================
@@ -30,8 +30,8 @@ foreach ($accs['data'] as $acc) {
continue;
}
- $account = MailIn\Account::fromDb($acc);
try {
+ $account = MailIn\Account::fromDb($acc);
$summary = $account->check();
$mailin_results[] = [
'account' => $acc['account'],
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/1b9e15985153ec9c15d9e8d3e21803ffd9be8d56
--
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/1b9e15985153ec9c15d9e8d3e21803ffd9be8d56
You're receiving this email because of your account on gitlab.com. Manage all notifications: https://gitlab.com/-/profile/notifications | Help: https://gitlab.com/help
_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs