add Option to disable email, which don't work in docker

This commit is contained in:
Dario Rekowski on RockPI 2021-02-24 18:09:23 +00:00 committed by Ulf Gebhardt
parent a38f2d67ae
commit 9668242c8a
No known key found for this signature in database
GPG Key ID: 81308EFE29ABFEBD
2 changed files with 5 additions and 1 deletions

View File

@ -235,6 +235,8 @@ class TransactionCreation extends TransactionBase {
public function sendNotificationEmail($memo)
{
$disable_email = Configure::read('disableEmail', false);
if($disable_email) return true;
// send notification email
$receiverUserId = $this->getStateUserId($this->getReceiverPublic());
$receiverUser = $this->getStateUser($receiverUserId);

View File

@ -214,7 +214,9 @@ class TransactionTransfer extends TransactionBase {
public function sendNotificationEmail($memo)
{
// send notification email
$disable_email = Configure::read('disableEmail', false);
if($disable_email) return true;
$senderAmount = $this->protoTransactionTransfer->getSenderAmounts()[0];
$receiverAmount = $this->protoTransactionTransfer->getReceiverAmounts()[0];
$senderUserId = $this->getStateUserId($senderAmount->getEd25519SenderPubkey());