Add support for mailgun API endpoint (#3364)

This commit is contained in:
Lukas 2021-06-05 17:38:47 +02:00 committed by GitHub
parent b79d6e9e64
commit 75d254a6a4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 0 deletions

View file

@ -25,6 +25,7 @@ MAIL_USERNAME=
MAIL_PASSWORD= MAIL_PASSWORD=
MAIL_ENCRYPTION=tls MAIL_ENCRYPTION=tls
MAIL_FROM=no-reply@example.com MAIL_FROM=no-reply@example.com
MAILGUN_ENDPOINT=api.mailgun.net
# You should set this to your domain to prevent it defaulting to 'localhost', causing # You should set this to your domain to prevent it defaulting to 'localhost', causing
# mail servers such as Gmail to reject your mail. # mail servers such as Gmail to reject your mail.
# #

View file

@ -37,6 +37,7 @@ class EmailSettingsCommand extends Command
{--encryption=} {--encryption=}
{--host=} {--host=}
{--port=} {--port=}
{--endpoint=}
{--username=} {--username=}
{--password=}'; {--password=}';
@ -140,6 +141,11 @@ class EmailSettingsCommand extends Command
trans('command/messages.environment.mail.ask_mailgun_secret'), trans('command/messages.environment.mail.ask_mailgun_secret'),
$this->config->get('services.mailgun.secret') $this->config->get('services.mailgun.secret')
); );
$this->variables['MAILGUN_ENDPOINT'] = $this->option('endpoint') ?? $this->ask(
trans('command/messages.environment.mail.ask_mailgun_endpoint'),
$this->config->get('services.mailgun.endpoint')
);
} }
/** /**

View file

@ -16,6 +16,7 @@ return [
'mailgun' => [ 'mailgun' => [
'domain' => env('MAILGUN_DOMAIN'), 'domain' => env('MAILGUN_DOMAIN'),
'secret' => env('MAILGUN_SECRET'), 'secret' => env('MAILGUN_SECRET'),
'endpoint' => env('MAILGUN_ENDPOINT')
], ],
'mandrill' => [ 'mandrill' => [

View file

@ -53,6 +53,7 @@ return [
'ask_smtp_username' => 'SMTP Username', 'ask_smtp_username' => 'SMTP Username',
'ask_smtp_password' => 'SMTP Password', 'ask_smtp_password' => 'SMTP Password',
'ask_mailgun_domain' => 'Mailgun Domain', 'ask_mailgun_domain' => 'Mailgun Domain',
'ask_mailgun_endpoint' => 'Mailgun Endpoint',
'ask_mailgun_secret' => 'Mailgun Secret', 'ask_mailgun_secret' => 'Mailgun Secret',
'ask_mandrill_secret' => 'Mandrill Secret', 'ask_mandrill_secret' => 'Mandrill Secret',
'ask_postmark_username' => 'Postmark API Key', 'ask_postmark_username' => 'Postmark API Key',