Skip to content

Commit

Permalink
Return best mail address for given document type
Browse files Browse the repository at this point in the history
  • Loading branch information
Vítězslav Dvořák committed Nov 21, 2023
1 parent cea4134 commit 2cbe934
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/AbraFlexi/email.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function getEmail(string $purpose = '') {
if (empty($this->getDataValue('kontaktEmail'))) {
$addresser = new Adresar($this->getDataValue('firma'), array_merge(['detail' => 'custom:email'], $this->getConnectionOptions()));
if (empty($addresser->getDataValue('email'))) {
$email = $addresser->getNotificationEmailAddress($purpose);
$email = $addresser->getNotificationEmailAddress(empty($purpose) ? self::docTypeToPurpose($this) : $purpose);
} else {
$email = $addresser->getDataValue('email');
}
Expand Down

0 comments on commit 2cbe934

Please sign in to comment.