mirror of
https://github.com/anonaddy/anonaddy
synced 2026-04-25 17:15:29 +02:00
27 lines
676 B
PHP
27 lines
676 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
class DomainVerificationController extends Controller
|
|
{
|
|
public function __construct()
|
|
{
|
|
$this->middleware('throttle:6,1');
|
|
}
|
|
|
|
public function checkSending($id)
|
|
{
|
|
$domain = user()->domains()->findOrFail($id);
|
|
|
|
// Check MX records separately
|
|
if (! $domain->checkMxRecords()) {
|
|
return response()->json([
|
|
'success' => false,
|
|
'message' => 'MX record not found or does not have correct priority. This could be due to DNS caching, please try again later.',
|
|
]);
|
|
}
|
|
|
|
return $domain->checkVerificationForSending();
|
|
}
|
|
}
|