NobGit
public nobgit read

NobMail

Based on mailcow: dockerized

Languages

Repository composition by tracked source files.

PHP
PHP 49% JavaScript 35% HTML 9% CSS 4% Shell 2% Python 1% Lua 0% Perl 0% Ruby 0% SCSS 0%
Create file Wiki Documentation
Clone
https://nobgit.com/orgs/nobgit/nobmail.git
ssh://[email protected]:2222/orgs/nobgit/nobmail.git

Commit

[Web] Add a timeout to PHPMailer [Web] Fix relayhost test with empty username

32c0b4a2
AndrĂ© Peters <[email protected]> 8 years ago
data/web/inc/ajax/relay_check.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Diff

diff --git a/data/web/inc/ajax/relay_check.php b/data/web/inc/ajax/relay_check.php
index 575a8ad8..320f9274 100644
--- a/data/web/inc/ajax/relay_check.php
+++ b/data/web/inc/ajax/relay_check.php
@@ -23,7 +23,7 @@ if (isset($_SESSION['mailcow_cc_role']) && $_SESSION['mailcow_cc_role'] == "admi
     $password = $relayhost_details['password'];
 
     $mail = new PHPMailer;
-
+    $mail->Timeout = 10;
     $mail->SMTPDebug = 3;
     $mail->Debugoutput = function($str, $level) {
       foreach(preg_split("/((\r?\n)|(\r\n?)|\n)/", $str) as $line){
@@ -57,8 +57,8 @@ if (isset($_SESSION['mailcow_cc_role']) && $_SESSION['mailcow_cc_role'] == "admi
       $mail->SMTPAuth = true;
       $mail->Username = $username;
       $mail->Password = $password;
-      $mail->Port = $port;
     }
+    $mail->Port = $port;
     $mail->setFrom($mail_from, 'Mailer');
     $mail->Subject = 'A subject for a SMTP test';
     $mail->addAddress($RELAY_TO, 'Joe Null');