Commits vergleichen
7 Commits
Autor | SHA1 | Datum | |
---|---|---|---|
bf7d43af45 | |||
30dc8f445a | |||
935a935618 | |||
1c83505a5d | |||
6c6ec19f82 | |||
9830416f64 | |||
e72a3da5d7 |
@ -18,6 +18,7 @@ namespace D3\MailConfigChecker\Application\Controller\Admin;
|
||||
use Assert\Assert;
|
||||
use Assert\InvalidArgumentException;
|
||||
use D3\MailConfigChecker\Application\Model\Exception\d3TranslatableLazyAssertionException;
|
||||
use ErrorException;
|
||||
use Exception;
|
||||
use OxidEsales\Eshop\Application\Controller\Admin\AdminDetailsController;
|
||||
use OxidEsales\Eshop\Application\Model\Shop;
|
||||
@ -70,16 +71,26 @@ class MailConfigCheck extends AdminDetailsController
|
||||
$this->getCurrentMailer();
|
||||
}
|
||||
|
||||
function exceptions_error_handler($severity, $message, $filename, $lineno) {
|
||||
throw new ErrorException($message, 0, $severity, $filename, $lineno);
|
||||
}
|
||||
|
||||
protected function getCurrentMailer()
|
||||
{
|
||||
try {
|
||||
$shop = Registry::getConfig()->getActiveShop();
|
||||
|
||||
$mail = oxNew(Email::class);
|
||||
$mail->setRecipient($this->testMailAddress);
|
||||
$mail->setBody('.');
|
||||
$mail->setFrom($shop->getFieldData('oxowneremail'));
|
||||
set_error_handler([$this, 'exceptions_error_handler']);
|
||||
$mail->send();
|
||||
$this->addTplParam('mailer', $mail->getMailer());
|
||||
} catch (Exception $e) {
|
||||
Registry::getUtilsView()->addErrorToDisplay($e);
|
||||
} finally {
|
||||
restore_error_handler();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -17,9 +17,7 @@ namespace D3\MailConfigChecker\Application\Controller\Admin;
|
||||
|
||||
use Assert\InvalidArgumentException;
|
||||
use D3\MailConfigChecker\Application\Model\SpfResult;
|
||||
use Mika56\SPFCheck\DNS\DNSRecordGetter;
|
||||
use Mika56\SPFCheck\Model\Query;
|
||||
use Mika56\SPFCheck\Model\Result;
|
||||
use Mika56\SPFCheck\DNSRecordGetter;
|
||||
use Mika56\SPFCheck\SPFCheck;
|
||||
use OxidEsales\Eshop\Application\Controller\Admin\AdminDetailsController;
|
||||
use OxidEsales\Eshop\Application\Model\Shop;
|
||||
@ -84,25 +82,23 @@ class SpfChecker extends AdminDetailsController
|
||||
protected function checkSpfByDomain($domain, &$summarize)
|
||||
{
|
||||
$checker = new SPFCheck(new DNSRecordGetter());
|
||||
$query = new Query('', $domain);
|
||||
|
||||
$result = $checker->getResult($query);
|
||||
switch ($result->getResult()) {
|
||||
case Result::FAIL:
|
||||
case Result::NEUTRAL:
|
||||
case Result::PASS:
|
||||
case Result::SOFTFAIL:
|
||||
switch ($checker->isIPAllowed(gethostbyname($domain), $domain)) {
|
||||
case SPFCheck::RESULT_FAIL:
|
||||
case SPFCheck::RESULT_NEUTRAL:
|
||||
case SPFCheck::RESULT_PASS:
|
||||
case SPFCheck::RESULT_SOFTFAIL:
|
||||
$status = SpfResult::SET;
|
||||
break;
|
||||
case Result::NONE:
|
||||
case SPFCheck::RESULT_NONE:
|
||||
$status = SpfResult::MISSING;
|
||||
break;
|
||||
default:
|
||||
$status = SpfResult::ERROR;
|
||||
}
|
||||
|
||||
$rawRecord = ($record = $result->getRecord()) ?
|
||||
$record->getRawRecord() :
|
||||
$rawRecord = ($record = (new DNSRecordGetter())->getSPFRecordForDomain($domain)) ?
|
||||
implode(', ', $record) :
|
||||
null;
|
||||
|
||||
$summarize[$domain] = oxNew(SpfResult::class, $status, $rawRecord);
|
||||
|
@ -23,7 +23,7 @@ return [
|
||||
'D3_MAILCHECKER_CFGCHECK_SHOPSEND_SMTP_DESC' => 'Alles in bester Ordnung. Bitte prüfen Sie noch die nötigen SPF-Einträge für Ihre Domain(s).',
|
||||
'D3_MAILCHECKER_CFGCHECK_STARTCHECK' => 'Konfiguration testen',
|
||||
|
||||
'D3_MAILCHECKER_SMTPCHECK_DESC1' => 'Wenn trotz passend eingegebenen Daten kein Mailversand über SMTP erfolgt, kann hier der Anmeldeversuch am Postausgangsserver nachollzogen werden. Eventuell auftretende Meldungen werden gezeigt.',
|
||||
'D3_MAILCHECKER_SMTPCHECK_DESC1' => 'Wenn trotz passend eingegebenen Daten kein Mailversand über SMTP erfolgt, kann hier der Anmeldeversuch am Postausgangsserver nachvollzogen werden. Eventuell auftretende Meldungen werden gezeigt.',
|
||||
'D3_MAILCHECKER_SMTPCHECK_DESC2' => 'Auch neue Verbindungen können hier vorab getestet werden.',
|
||||
'D3_MAILCHECKER_SMTPCHECK_DESC3' => 'Zum Verbindungsaufbau werden diese Einstellungen verwendet. Diese können gern geändert werden. Sie werden nicht in den Shop zurückgespeichert. Der optionale Mailversand verschickt direkt an den SMTP Server und umgeht die Shoplogik.',
|
||||
'D3_MAILCHECKER_SMTPCHECK_SENDER' => 'Absender',
|
||||
|
29
CHANGELOG.md
29
CHANGELOG.md
@ -4,27 +4,16 @@ All notable changes to this project will be documented in this file.
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [Unreleased](https://git.d3data.de/D3Public/MyModule/compare/1.1.0.0...rel_1.x)
|
||||
|
||||
## [1.1.0.0](https://git.d3data.de/D3Public/MyModule/compare/1.0.0.0...1.1.0.0) - 2022-07-26
|
||||
### Added
|
||||
- another feature
|
||||
|
||||
### Changed
|
||||
- changed old code
|
||||
|
||||
### Deprecated
|
||||
- ...
|
||||
|
||||
### Removed
|
||||
- ...
|
||||
## [Unreleased](https://git.d3data.de/D3Public/MyModule/compare/1.0.0.0...rel_1.x)
|
||||
|
||||
## [1.0.0.1](https://git.d3data.de/D3Public/MailConfigChecker/releases/tag/1.0.0.1) - 2024-04-11
|
||||
### Fixed
|
||||
- ...
|
||||
- MailConfigCheck need a valid "from" mailadress to check smtp correctly
|
||||
|
||||
### Security
|
||||
- ...
|
||||
|
||||
## [1.0.0.0](https://git.d3data.de/D3Public/MyModule/releases/tag/1.0.0.0) - 2022-07-25
|
||||
## [1.0.0.0](https://git.d3data.de/D3Public/MailConfigChecker/releases/tag/1.0.0.0) - 2023-12-13
|
||||
### Added
|
||||
- implemented features
|
||||
- Checking the mail configuration
|
||||
- Checking the transmission path used
|
||||
- SMTP connection analysis
|
||||
- SPF header check
|
||||
- Test mail dispatch
|
29
README.en.md
29
README.en.md
@ -1,9 +1,7 @@
|
||||
[![deutsche Version](https://logos.oxidmodule.com/de2_xs.svg)](README.md)
|
||||
[![english version](https://logos.oxidmodule.com/en2_xs.svg)](README.en.md)
|
||||
|
||||
# D³ Modulname for OXID eShop
|
||||
|
||||
Insert short description here
|
||||
# D³ Mail Configuration Check for OXID eShop
|
||||
|
||||
## Table of content
|
||||
|
||||
@ -12,35 +10,22 @@ Insert short description here
|
||||
- [Changelog](#changelog)
|
||||
- [Contributing](#contributing)
|
||||
- [License](#license)
|
||||
- [Further licences and terms of use](#further-licences-and-terms-of-use)
|
||||
|
||||
## Installation
|
||||
|
||||
This package requires an OXID eShop installed with Composer in a version defined in the [composer.json](composer.json).
|
||||
|
||||
Please enter the following section in the `composer.json` of your project:
|
||||
|
||||
```
|
||||
"extra": {
|
||||
optional instructions from 3rd party packages (e.g. patch or symlink instructions)
|
||||
}
|
||||
```
|
||||
|
||||
Open a command line and navigate to the root directory of the shop (parent directory of source and vendor). Execute the following commands. Adapt the path details to your installation environment.
|
||||
|
||||
```bash
|
||||
composer require d3/modulename:^2.0
|
||||
|
||||
./vendor/bin/oe-eshop-db_migrate migrations:migrate modulemetadataid
|
||||
composer require d3/mailconfigchecker:^1.0
|
||||
```
|
||||
|
||||
If necessary, please confirm that you allow `package-name` to execute code.
|
||||
|
||||
Activate the module in Shopadmin under "Extensions -> Modules".
|
||||
|
||||
## How to use
|
||||
|
||||
...
|
||||
Call up the pages in the backend of the shop under "Service -> Email checking".
|
||||
|
||||
## Changelog
|
||||
|
||||
@ -57,7 +42,7 @@ If you have a suggestion that would make this better, please fork the repo and c
|
||||
- Open a Pull Request
|
||||
|
||||
## License
|
||||
(status: 2022-07-30)
|
||||
(status: 2023-12-13)
|
||||
|
||||
Distributed under the GPLv3 license.
|
||||
|
||||
@ -67,8 +52,4 @@ Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
|
||||
This software is distributed under the GNU GENERAL PUBLIC LICENSE version 3.
|
||||
```
|
||||
|
||||
For full copyright and licensing information, please see the [LICENSE](LICENSE.md) file distributed with this source code.
|
||||
|
||||
## Further licences and terms of use
|
||||
|
||||
...
|
||||
For full copyright and licensing information, please see the [LICENSE](LICENSE.md) file distributed with this source code.
|
27
README.md
27
README.md
@ -1,9 +1,7 @@
|
||||
[![deutsche Version](https://logos.oxidmodule.com/de2_xs.svg)](README.md)
|
||||
[![english version](https://logos.oxidmodule.com/en2_xs.svg)](README.en.md)
|
||||
|
||||
# D³ Modulname für OXID eShop
|
||||
|
||||
Hier Kurzbeschreibung einfügen
|
||||
# D³ E-Mail Konfigurationsprüfung für OXID eShop
|
||||
|
||||
## Inhaltsverzeichnis
|
||||
|
||||
@ -12,36 +10,23 @@ Hier Kurzbeschreibung einfügen
|
||||
- [Changelog](#changelog)
|
||||
- [Beitragen](#beitragen)
|
||||
- [Lizenz](#lizenz)
|
||||
- [weitere Lizenzen und Nutzungsbedingungen](#weitere-lizenzen-und-nutzungsbedingungen)
|
||||
|
||||
## Installation
|
||||
|
||||
Dieses Paket erfordert einen mit Composer installierten OXID eShop in einer in der [composer.json](composer.json) definierten Version.
|
||||
|
||||
Bitte tragen Sie den folgenden Abschnitt in die `composer.json` Ihres Projektes ein:
|
||||
|
||||
```
|
||||
"extra": {
|
||||
optionale Anweisungen von 3rd-Party-Packages (z.B. Patch- oder Symlink-Anweisungen)
|
||||
}
|
||||
```
|
||||
|
||||
Öffnen Sie eine Kommandozeile und navigieren Sie zum Stammverzeichnis des Shops (Elternverzeichnis von source und vendor). Führen Sie die folgenden Befehle aus. Passen Sie die Pfadangaben an Ihre Installationsumgebung an.
|
||||
|
||||
|
||||
```bash
|
||||
composer require d3/modulename:^2.0
|
||||
|
||||
./vendor/bin/oe-eshop-db_migrate migrations:migrate modulemetadataid
|
||||
composer require d3/mailconfigchecker:^1.0
|
||||
```
|
||||
|
||||
Sofern nötig, bestätigen Sie bitte, dass Sie `package-name` erlauben, Code auszuführen.
|
||||
|
||||
Aktivieren Sie das Modul im Shopadmin unter "Erweiterungen -> Module".
|
||||
|
||||
## Verwendung
|
||||
|
||||
...
|
||||
Rufen Sie die Seiten im Backend des Shops unter "Service -> E-Mail Prüfung" auf.
|
||||
|
||||
## Changelog
|
||||
|
||||
@ -58,7 +43,7 @@ Wenn Sie eine Verbesserungsvorschlag haben, legen Sie einen Fork des Repositorie
|
||||
- Öffnen Sie einen Pull Request
|
||||
|
||||
## Lizenz
|
||||
(Stand: 06.05.2021)
|
||||
(Stand: 14.12.2023)
|
||||
|
||||
Vertrieben unter der GPLv3 Lizenz.
|
||||
|
||||
@ -69,7 +54,3 @@ Diese Software wird unter der GNU GENERAL PUBLIC LICENSE Version 3 vertrieben.
|
||||
```
|
||||
|
||||
Die vollständigen Copyright- und Lizenzinformationen entnehmen Sie bitte der [LICENSE](LICENSE.md)-Datei, die mit diesem Quellcode verteilt wurde.
|
||||
|
||||
## weitere Lizenzen und Nutzungsbedingungen
|
||||
|
||||
...
|
@ -30,19 +30,12 @@
|
||||
"GPL-3.0-or-later"
|
||||
],
|
||||
"require": {
|
||||
"php": ">=7.3",
|
||||
"oxid-esales/oxideshop-ce": "6.8 - 6.14",
|
||||
"php": ">=7.1",
|
||||
"oxid-esales/oxideshop-ce": "6.3 - 6.9",
|
||||
"pear/net_smtp": "^1.11",
|
||||
"mika56/spfcheck": "^1.1.7|^2.1.1",
|
||||
"mika56/spfcheck": "^1.1.7",
|
||||
"beberlei/assert": "^3.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"php": "^7.4",
|
||||
"phpunit/phpunit" : "^9.5",
|
||||
"friendsofphp/php-cs-fixer": "^3.9",
|
||||
"phpstan/phpstan": "^1.8",
|
||||
"boxblinkracer/phpunuhi": "^1.12"
|
||||
},
|
||||
"extra": {
|
||||
"oxideshop": {
|
||||
"blacklist-filter": [
|
||||
|
@ -40,7 +40,7 @@ $aModule = [
|
||||
'en' => '',
|
||||
],
|
||||
'thumbnail' => 'picture.svg',
|
||||
'version' => '1.0.0.0',
|
||||
'version' => '1.0.0.1',
|
||||
'author' => 'D³ Data Development (Inh.: Thomas Dartsch)',
|
||||
'email' => 'support@shopmodule.com',
|
||||
'url' => 'https://www.oxidmodule.com/',
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren