Skip to content

Commit f2293a7

Browse files
committed
Allow a user to disable peer check when using TLS/STARTTLS
This is useful when developing and on Docker setups. Despite setting encryption to null, if a server supports STARTTLS with a self-signed certificate, the mailer try to upgrade the connection with STARTTLS.
1 parent 9b66e93 commit f2293a7

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

.env.example.complete

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ MAIL_PORT=1025
7979
MAIL_USERNAME=null
8080
MAIL_PASSWORD=null
8181
MAIL_ENCRYPTION=null
82+
MAIL_VERIFY_PEER=true
8283

8384
# Command to use when email is sent via sendmail
8485
MAIL_SENDMAIL_COMMAND="/usr/sbin/sendmail -bs"
@@ -372,4 +373,4 @@ LOG_FAILED_LOGIN_CHANNEL=errorlog_plain_webserver
372373
# IP address '146.191.42.4' would result in '146.191.x.x' being logged.
373374
# For the IPv6 address '2001:db8:85a3:8d3:1319:8a2e:370:7348' this would result as:
374375
# '2001:db8:85a3:8d3:x:x:x:x'
375-
IP_ADDRESS_PRECISION=4
376+
IP_ADDRESS_PRECISION=4

app/Config/mail.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
3333
'username' => env('MAIL_USERNAME'),
3434
'password' => env('MAIL_PASSWORD'),
35+
'verify_peer' => env('MAIL_VERIFY_PEER', true),
3536
'timeout' => null,
3637
'local_domain' => env('MAIL_EHLO_DOMAIN'),
3738
],

0 commit comments

Comments
 (0)