release 0.6
This commit is contained in:
parent
da440d8db2
commit
6c8615cbb9
@ -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
|
testMail 0.5 - 2023.08.13
|
||||||
===========================================================
|
===========================================================
|
||||||
* Require Dotclear 2.27
|
* Require Dotclear 2.27
|
||||||
|
28
README.md
28
README.md
@ -1,25 +1,22 @@
|
|||||||
# README
|
# README
|
||||||
|
|
||||||
[![Release](https://img.shields.io/badge/release-0.5-a2cbe9.svg)](https://git.dotclear.watch/JcDenis/testMail/releases)
|
[![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.08.13-c44d58.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.27-137bbb.svg)](https://fr.dotclear.org/download)
|
[![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)
|
[![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
|
_testmail_ is a plugin for the open-source web publishing software called [Dotclear](https://www.dotclear.org).
|
||||||
web publishing software called Dotclear.
|
|
||||||
|
|
||||||
It helps dev to test dotclear mail system.
|
> It helps dev to test dotclear mail system.
|
||||||
|
|
||||||
## REQUIREMENTS
|
## REQUIREMENTS
|
||||||
|
|
||||||
_testMail_ requires:
|
|
||||||
|
|
||||||
* super admin permission
|
* super admin permission
|
||||||
* Dotclear 2.27
|
* Dotclear 2.28
|
||||||
* PHP 7.4
|
* PHP 8.1+
|
||||||
|
|
||||||
## USAGE
|
## USAGE
|
||||||
|
|
||||||
@ -30,9 +27,10 @@ Access mail form from admin sidebar system menu **Mail test**.
|
|||||||
|
|
||||||
## LINKS
|
## LINKS
|
||||||
|
|
||||||
* License : [GNU GPL v2](https://www.gnu.org/licenses/old-licenses/lgpl-2.0.html)
|
* [License](https://git.dotclear.watch/JcDenis/testMail/src/branch/master/LICENSE)
|
||||||
* Source & contribution : [Gitea Page](https://git.dotclear.watch/JcDenis/testMail) or [GitHub Page](https://github.com/JcDenis/testMail)
|
* [Packages & details](https://git.dotclear.watch/JcDenis/testMail/releases) (or on [Dotaddict](https://plugins.dotaddict.org/dc2/details/testMail))
|
||||||
* Packages & details: [Gitea Page](https://git.dotclear.watch/JcDenis/testMail/releases) or [Dotaddict Page](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
|
## CONTRIBUTORS
|
||||||
|
|
||||||
|
@ -20,9 +20,9 @@ $this->registerModule(
|
|||||||
'Mail test',
|
'Mail test',
|
||||||
'Send a simple mail from admin',
|
'Send a simple mail from admin',
|
||||||
'Osku and contributors',
|
'Osku and contributors',
|
||||||
'0.5',
|
'0.6',
|
||||||
[
|
[
|
||||||
'requires' => [['core', '2.27']],
|
'requires' => [['core', '2.28']],
|
||||||
'permissions' => null,
|
'permissions' => null,
|
||||||
'type' => 'plugin',
|
'type' => 'plugin',
|
||||||
'support' => 'https://git.dotclear.watch/JcDenis/' . basename(__DIR__) . '/issues',
|
'support' => 'https://git.dotclear.watch/JcDenis/' . basename(__DIR__) . '/issues',
|
||||||
|
@ -2,11 +2,11 @@
|
|||||||
<modules xmlns:da="http://dotaddict.org/da/">
|
<modules xmlns:da="http://dotaddict.org/da/">
|
||||||
<module id="testMail">
|
<module id="testMail">
|
||||||
<name>Mail test</name>
|
<name>Mail test</name>
|
||||||
<version>0.5</version>
|
<version>0.6</version>
|
||||||
<author>Osku and contributors</author>
|
<author>Osku and contributors</author>
|
||||||
<desc>Send a simple mail from admin</desc>
|
<desc>Send a simple mail from admin</desc>
|
||||||
<file>https://git.dotclear.watch/JcDenis/testMail/releases/download/v0.5/plugin-testMail.zip</file>
|
<file>https://git.dotclear.watch/JcDenis/testMail/releases/download/v0.6/plugin-testMail.zip</file>
|
||||||
<da:dcmin>2.27</da:dcmin>
|
<da:dcmin>2.28</da:dcmin>
|
||||||
<da:details>https://git.dotclear.watch/JcDenis/testMail/src/branch/master/README.md</da:details>
|
<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>
|
<da:support>https://git.dotclear.watch/JcDenis/testMail/issues</da:support>
|
||||||
</module>
|
</module>
|
||||||
|
@ -14,7 +14,7 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace Dotclear\Plugin\testMail;
|
namespace Dotclear\Plugin\testMail;
|
||||||
|
|
||||||
use dcCore;
|
use Dotclear\App;
|
||||||
use Dotclear\Core\Backend\{
|
use Dotclear\Core\Backend\{
|
||||||
Notices,
|
Notices,
|
||||||
Page
|
Page
|
||||||
@ -75,7 +75,7 @@ class Manage extends Process
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
dcCore::app()->error->add($e->getMessage());
|
App::error()->add($e->getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -136,7 +136,7 @@ class Manage extends Process
|
|||||||
->__call('items', [[
|
->__call('items', [[
|
||||||
(new Checkbox('active_headers', false))
|
(new Checkbox('active_headers', false))
|
||||||
->__call('value', [1]),
|
->__call('value', [1]),
|
||||||
(new Label(__('Active mail headers')))
|
(new Label(__('Active mail headers'), Label::OUTSIDE_LABEL_AFTER))
|
||||||
->__call('for', ['active_headers'])
|
->__call('for', ['active_headers'])
|
||||||
->__call('class', ['classic']),
|
->__call('class', ['classic']),
|
||||||
]]),
|
]]),
|
||||||
@ -156,20 +156,15 @@ class Manage extends Process
|
|||||||
|
|
||||||
private static function getHeaders(): array
|
private static function getHeaders(): array
|
||||||
{
|
{
|
||||||
// nullsafe
|
|
||||||
if (is_null(dcCore::app()->blog)) {
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'From: ' . Mail::B64Header(dcCore::app()->blog->name) .
|
'From: ' . Mail::B64Header(App::blog()->name()) .
|
||||||
'<no-reply@' . str_replace('http://', '', Http::getHost()) . ' >',
|
'<no-reply@' . str_replace('http://', '', Http::getHost()) . ' >',
|
||||||
'Content-Type: text/HTML; charset=UTF-8;' .
|
'Content-Type: text/HTML; charset=UTF-8;' .
|
||||||
'X-Originating-IP: ' . Http::realIP(),
|
'X-Originating-IP: ' . Http::realIP(),
|
||||||
'X-Mailer: ' . My::X_MAILER,
|
'X-Mailer: ' . My::X_MAILER,
|
||||||
'X-Blog-Id: ' . Mail::B64Header(dcCore::app()->blog->id),
|
'X-Blog-Id: ' . Mail::B64Header(App::blog()->id()),
|
||||||
'X-Blog-Name: ' . Mail::B64Header(dcCore::app()->blog->name),
|
'X-Blog-Name: ' . Mail::B64Header(App::blog()->name()),
|
||||||
'X-Blog-Url: ' . Mail::B64Header(dcCore::app()->blog->url),
|
'X-Blog-Url: ' . Mail::B64Header(App::blog()->url()),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace Dotclear\Plugin\testMail;
|
namespace Dotclear\Plugin\testMail;
|
||||||
|
|
||||||
use dcCore;
|
use Dotclear\App;
|
||||||
use Dotclear\Module\MyPlugin;
|
use Dotclear\Module\MyPlugin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -27,6 +27,6 @@ class My extends MyPlugin
|
|||||||
|
|
||||||
public static function checkXustomContext(int $context): ?bool
|
public static function checkXustomContext(int $context): ?bool
|
||||||
{
|
{
|
||||||
return defined('DC_CONTEXT_ADMIN') && dcCore::app()->auth->isSuperAdmin();
|
return defined('DC_CONTEXT_ADMIN') && App::auth()->isSuperAdmin();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user