release 0.6

This commit is contained in:
Jean-Christian Paul Denis 2023-10-07 23:07:10 +02:00
parent da440d8db2
commit 6c8615cbb9
Signed by: JcDenis
GPG Key ID: 1B5B8C5B90B6C951
6 changed files with 33 additions and 34 deletions

View File

@ -1,3 +1,9 @@
testMail 0.6 - 2023.10.07
===========================================================
* Require Dotclear 2.28
* Require PHP 8.1
* Upgrade to Dotclear 2.28
testMail 0.5 - 2023.08.13
===========================================================
* Require Dotclear 2.27

View File

@ -1,25 +1,22 @@
# README
[![Release](https://img.shields.io/badge/release-0.5-a2cbe9.svg)](https://git.dotclear.watch/JcDenis/testMail/releases)
[![Date](https://img.shields.io/badge/date-2023.08.13-c44d58.svg)](https://git.dotclear.watch/JcDenis/testMail/releases)
[![Dotclear](https://img.shields.io/badge/dotclear-v2.27-137bbb.svg)](https://fr.dotclear.org/download)
[![Release](https://img.shields.io/badge/release-0.6-a2cbe9.svg)](https://git.dotclear.watch/JcDenis/testMail/releases)
![Date](https://img.shields.io/badge/date-2023.10.07-c44d58.svg)
[![Dotclear](https://img.shields.io/badge/dotclear-v2.28-137bbb.svg)](https://fr.dotclear.org/download)
[![Dotaddict](https://img.shields.io/badge/dotaddict-official-9ac123.svg)](https://plugins.dotaddict.org/dc2/details/testMail)
[![License](https://img.shields.io/github/license/JcDenis/testMail)](https://git.dotclear.watch/JcDenis/testMail/blob/master/LICENSE)
[![License](https://img.shields.io/badge/license-GPL--2.0-ececec.svg)](https://git.dotclear.watch/JcDenis/testMail/src/branch/master/LICENSE)
## WHAT IS TESTMAIL ?
## ABOUT
_testMail_ is a plugin for the open-source
web publishing software called Dotclear.
_testmail_ is a plugin for the open-source web publishing software called [Dotclear](https://www.dotclear.org).
It helps dev to test dotclear mail system.
> It helps dev to test dotclear mail system.
## REQUIREMENTS
_testMail_ requires:
* super admin permission
* Dotclear 2.27
* PHP 7.4
* Dotclear 2.28
* PHP 8.1+
## USAGE
@ -30,9 +27,10 @@ Access mail form from admin sidebar system menu **Mail test**.
## LINKS
* License : [GNU GPL v2](https://www.gnu.org/licenses/old-licenses/lgpl-2.0.html)
* Source & contribution : [Gitea Page](https://git.dotclear.watch/JcDenis/testMail) or [GitHub Page](https://github.com/JcDenis/testMail)
* Packages & details: [Gitea Page](https://git.dotclear.watch/JcDenis/testMail/releases) or [Dotaddict Page](https://plugins.dotaddict.org/dc2/details/testMail)
* [License](https://git.dotclear.watch/JcDenis/testMail/src/branch/master/LICENSE)
* [Packages & details](https://git.dotclear.watch/JcDenis/testMail/releases) (or on [Dotaddict](https://plugins.dotaddict.org/dc2/details/testMail))
* [Sources & contributions](https://git.dotclear.watch/JcDenis/testMail) (or on [GitHub](https://github.com/JcDenis/testMail))
* [Issues & security](https://git.dotclear.watch/JcDenis/testMail/issues) (or on [GitHub](https://github.com/JcDenis/testMail/issues))
## CONTRIBUTORS

View File

@ -20,9 +20,9 @@ $this->registerModule(
'Mail test',
'Send a simple mail from admin',
'Osku and contributors',
'0.5',
'0.6',
[
'requires' => [['core', '2.27']],
'requires' => [['core', '2.28']],
'permissions' => null,
'type' => 'plugin',
'support' => 'https://git.dotclear.watch/JcDenis/' . basename(__DIR__) . '/issues',

View File

@ -2,11 +2,11 @@
<modules xmlns:da="http://dotaddict.org/da/">
<module id="testMail">
<name>Mail test</name>
<version>0.5</version>
<version>0.6</version>
<author>Osku and contributors</author>
<desc>Send a simple mail from admin</desc>
<file>https://git.dotclear.watch/JcDenis/testMail/releases/download/v0.5/plugin-testMail.zip</file>
<da:dcmin>2.27</da:dcmin>
<file>https://git.dotclear.watch/JcDenis/testMail/releases/download/v0.6/plugin-testMail.zip</file>
<da:dcmin>2.28</da:dcmin>
<da:details>https://git.dotclear.watch/JcDenis/testMail/src/branch/master/README.md</da:details>
<da:support>https://git.dotclear.watch/JcDenis/testMail/issues</da:support>
</module>

View File

@ -14,7 +14,7 @@ declare(strict_types=1);
namespace Dotclear\Plugin\testMail;
use dcCore;
use Dotclear\App;
use Dotclear\Core\Backend\{
Notices,
Page
@ -75,7 +75,7 @@ class Manage extends Process
return true;
} catch (Exception $e) {
dcCore::app()->error->add($e->getMessage());
App::error()->add($e->getMessage());
}
}
@ -136,7 +136,7 @@ class Manage extends Process
->__call('items', [[
(new Checkbox('active_headers', false))
->__call('value', [1]),
(new Label(__('Active mail headers')))
(new Label(__('Active mail headers'), Label::OUTSIDE_LABEL_AFTER))
->__call('for', ['active_headers'])
->__call('class', ['classic']),
]]),
@ -156,20 +156,15 @@ class Manage extends Process
private static function getHeaders(): array
{
// nullsafe
if (is_null(dcCore::app()->blog)) {
return [];
}
return [
'From: ' . Mail::B64Header(dcCore::app()->blog->name) .
'From: ' . Mail::B64Header(App::blog()->name()) .
'<no-reply@' . str_replace('http://', '', Http::getHost()) . ' >',
'Content-Type: text/HTML; charset=UTF-8;' .
'X-Originating-IP: ' . Http::realIP(),
'X-Mailer: ' . My::X_MAILER,
'X-Blog-Id: ' . Mail::B64Header(dcCore::app()->blog->id),
'X-Blog-Name: ' . Mail::B64Header(dcCore::app()->blog->name),
'X-Blog-Url: ' . Mail::B64Header(dcCore::app()->blog->url),
'X-Blog-Id: ' . Mail::B64Header(App::blog()->id()),
'X-Blog-Name: ' . Mail::B64Header(App::blog()->name()),
'X-Blog-Url: ' . Mail::B64Header(App::blog()->url()),
];
}
}

View File

@ -14,7 +14,7 @@ declare(strict_types=1);
namespace Dotclear\Plugin\testMail;
use dcCore;
use Dotclear\App;
use Dotclear\Module\MyPlugin;
/**
@ -27,6 +27,6 @@ class My extends MyPlugin
public static function checkXustomContext(int $context): ?bool
{
return defined('DC_CONTEXT_ADMIN') && dcCore::app()->auth->isSuperAdmin();
return defined('DC_CONTEXT_ADMIN') && App::auth()->isSuperAdmin();
}
}