Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
126 additions
and
158 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/bash | ||
php -f /usr/lib/abraflexi-mailer/SendDocument.php $1 $2 $3 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#!/bin/bash | ||
php -f /usr/lib/flexibee-mailer/SendUnsent.php | ||
php -f /usr/lib/abraflexi-mailer/SendUnsent.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#!/bin/bash | ||
php -f /usr/lib/flexibee-mailer/SendUnsentAttachments.php | ||
php -f /usr/lib/abraflexi-mailer/SendUnsentAttachments.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/bash | ||
php -f /usr/lib/abraflexi-mailer/ShowUnsent.php | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,7 @@ | ||
abraflexi-mailer (0.8.6) UNRELEASED; urgency=medium | ||
abraflexi-mailer (0.1) UNRELEASED; urgency=medium | ||
|
||
[ vitex ] | ||
* Rename Composer Package in Debian to be Composer 2.0 valid | ||
* Configuration is get from Enviroment if /etc/abraflexi/cliet.json does not exist. | ||
|
||
[ CyberVitexus ] | ||
* create /var/lib/abraflexi-mailer at first install | ||
* debian package installation fix | ||
* Release target added | ||
* Release target added | ||
* Release target added | ||
* separate AbraFlexi mailer init command | ||
* "Send Unsent mail" tool added | ||
|
||
-- CyberVitexus <vitex@exiv.jinonice.czf> Fri, 14 Aug 2020 15:25:26 +0200 | ||
|
||
abraflexi-mailer (0.7.6) experimental; urgency=medium | ||
|
||
[ Vítězslav Dvořák ] | ||
* Initial release | ||
* Package Update | ||
* Deps Update | ||
* Packager deps update | ||
* Deb Fix | ||
* pull-bank command | ||
|
||
|
||
-- vitex <vitex@hosting.vitexsoftware.cz> Mon, 19 Nov 2018 19:51:04 +0100 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
debian/conf/composer.json usr/lib/abraflexi-mailer/ | ||
src/* usr/lib/abraflexi-mailer/ | ||
src/AbraFlexi/Mailer/* usr/lib/abraflexi-mailer/Mailer/ | ||
#src/AbraFlexi/Mailer/* usr/lib/abraflexi-mailer/Mailer/ | ||
bin/* usr/bin/ | ||
mailer.json etc/abraflexi/ | ||
.env.template etc/abraflexi-mailer |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
<?php | ||
|
||
/** | ||
* abraflexi-send-document | ||
* | ||
* @copyright (c) 2018-2021, Vítězslav Dvořák | ||
*/ | ||
|
||
namespace AbraFlexi\Mailer; | ||
|
||
use AbraFlexi\FakturaVydana; | ||
use AbraFlexi\RO; | ||
use Ease\Functions; | ||
use Ease\Html\PTag; | ||
use Ease\Shared; | ||
|
||
define('APP_NAME', 'SentDocument'); | ||
define('EASE_LOGGER', 'syslog|console'); | ||
require_once '../vendor/autoload.php'; | ||
$shared = new Shared(); | ||
if(file_exists('../.env')){ | ||
$shared->loadConfig('../.env', true); | ||
} | ||
|
||
$document = $argv[1]; | ||
$evidence = array_key_exists(2, $argv) ? $argv[2] : 'faktura-vydana'; | ||
|
||
if ($argc > 2) { | ||
|
||
$documentor = new FakturaVydana(RO::code($document), ['evidence' => $evidence, 'ignore404' => true]); | ||
$documentor->logBanner(Functions::cfg('APP_NAME')); | ||
|
||
if ($documentor->lastResponseCode == 200) { | ||
|
||
$to = (array_key_exists(3, $argv) ? $argv[3] : $documentor->getEmail()); | ||
$documentor->addStatusMessage(RO::uncode($documentor->getRecordCode()) . "\t" . RO::uncode($documentor->getDataValue('firma')) . "\t" . $to . "\t" . $documentor->getDataValue('poznam'), 'success'); | ||
|
||
$mailer = new Mailer($documentor, $to); | ||
|
||
if (array_key_exists('poznam', $documentor->getColumnsInfo())) { | ||
preg_match_all('/cc:[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}/i', $documentor->getDataValue('poznam'), $ccs); | ||
if (!empty($ccs[0])) { | ||
$mailer->setMailHeaders(['Cc' => str_replace('cc:', '', implode(',', $ccs[0]))]); | ||
} | ||
} | ||
|
||
if (array_key_exists('popis', $documentor->getColumnsInfo())) { | ||
$mailer->addItem(new PTag($documentor->getDataValue('popis'))); | ||
} | ||
|
||
$documentor->addStatusMessage(_('Attaching') . ': ' . implode(',', $mailer->addAttachments())); | ||
|
||
if (array_key_exists('juhSum', $documentor->getColumnsInfo())) { | ||
if (Functions::cfg('ADD_QRCODE')) { | ||
$mailer->addQrCode(); | ||
} | ||
} | ||
|
||
if (array_key_exists('stavMailK', $documentor->getColumnsInfo())) { | ||
$result = ($mailer->send() && $documentor->sync(['id' => $documentor->getRecordIdent(), 'stavMailK' => 'stavMail.odeslano'])); | ||
} else { | ||
$result = $mailer->send(); | ||
} | ||
} else { | ||
$documentor->addStatusMessage(sprintf(_('Cannot read %s %s'), $evidence, $document)); | ||
} | ||
} else { | ||
echo _('AbraFlexi Document Sender') . "\n"; | ||
echo "abraflexi-send-document <DocID> [evidence-code] [recipent@email,another@recipient] \n"; | ||
echo "abraflexi-send-document VF1-7326/2020 faktura-vydana \n"; | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters