Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
bobimicroweber committed Sep 30, 2024
1 parent c52d63b commit 5fd2460
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions web/Modules/Email/App/Console/SetupEmailServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use App\UniversalDatabaseExecutor;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Blade;
use Modules\Email\App\Models\DomainDkim;
use Modules\LetsEncrypt\Models\LetsEncryptCertificate;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputArgument;
Expand Down
11 changes: 11 additions & 0 deletions web/Modules/Email/App/Http/Livewire/DkimSetup.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Modules\Email\App\Http\Livewire;

use Livewire\Component;
use Modules\Email\App\Models\DomainDkim;
use Modules\Email\DkimDomainSetup;

class DkimSetup extends Component
Expand Down Expand Up @@ -80,6 +81,16 @@ public function verify()
public function secure()
{
$output = DkimDomainSetup::run($this->domain);
if (isset($output['privateKey'])) {
$findDomainDkim = DomainDkim::where('domain_name', $this->domain)->first();
if (!$findDomainDkim) {
$findDomainDkim = new DomainDkim();
$findDomainDkim->domain_name = $this->domain;
}
$findDomainDkim->private_key = $output['privateKey'];
$findDomainDkim->public_key = $output['text'];
$findDomainDkim->save();
}

return $output;
}
Expand Down

0 comments on commit 5fd2460

Please sign in to comment.