[Vtigercrm-developers] Outgoing server vt6.1

Alan Lord alanslists at gmail.com
Mon Oct 20 13:41:29 GMT 2014


Think Alan Bell found it!

In mail.php, around line 291 $smtp_auth is set to a pear db result object.

> 	else{
> 		$smtp_auth = $adb->query_result($res,0,'smtp_auth');
>         if($smtp_auth == "1" || $smtp_auth == "true"){
>             $smtp_auth = true;
>         }
>     }
>
> 	$adb->println("Mail server name,username & password => '".$server."','".$username."','".$password."'");
> 	if($smtp_auth){
> 		$mail->SMTPAuth = true;	// turn on SMTP authentication
> 	}

After the $adb->println() call it is only being checked for not being 
false or null...

Looks like there should be an else in that first test...

So:
> 	else{
> 		$smtp_auth = $adb->query_result($res,0,'smtp_auth');
>         if($smtp_auth == "1" || $smtp_auth == "true"){
>             $smtp_auth = true;
>         } else {
               $smtp_auth = false;
           }
>     }

...

And so on.








More information about the vtigercrm-developers mailing list