Skip to content

Commit

Permalink
mail: NoValidateCert
Browse files Browse the repository at this point in the history
This adds code to disable certificate validation for IMAP/POP3 and SMTP.
  • Loading branch information
JediKev committed Oct 16, 2023
1 parent 3dd2ed3 commit d3c140c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions include/class.mail.php
Expand Up @@ -315,8 +315,8 @@ final public function init(AccountSetting $setting) {
// Attempt to connect to the mail server
$connect = $setting->getConnectionConfig();
// Let's go Brandon
parent::connect($connect['host'], $connect['port'],
$connect['ssl']);
parent::__construct($connect['host'], $connect['port'],
$connect['ssl'], true);
// Attempt authentication based on MailBoxAccount settings
$auth = $setting->getAuthCredentials();
switch (true) {
Expand Down Expand Up @@ -657,7 +657,10 @@ public function __construct(AccountSetting $setting) {
// Build out SmtpOptions options based on SmtpAccount Settings
private function buildOptions(AccountSetting $setting) {
// Dont send 'QUIT' on __destruct()
$config = ['use_complete_quit' => false];
$config = [
'use_complete_quit' => false,
'novalidatecert' => true
];
$connect = $setting->getConnectionConfig();
$auth = $setting->getAuthCredentials();
switch (true) {
Expand Down

0 comments on commit d3c140c

Please sign in to comment.