[Vtigercrm-commits] [Vtiger development] #8297: Workflow Task send email does not work if mailserver does not need a authentication

Vtiger development vtiger-tickets at trac.vtiger.com
Tue Oct 14 14:08:56 GMT 2014


#8297: Workflow Task send email does not work if mailserver does not need a
authentication
------------------------+------------------------
 Reporter:  bwaibel     |      Owner:  developer
     Type:  defect      |     Status:  new
 Priority:  unassigned  |  Milestone:  Unassigned
Component:  vtigercrm   |    Version:  6.1.0
 Severity:  Critical    |   Keywords:
------------------------+------------------------
 We use vTiger 6.1.

 If we set up a Workflow Task using "Send email", no email will be sent.
 If the task is doing a field update and send email, the field will be
 updated but the email will not been send.

 The cronjobs are running.
 The mail server is set to "not use authentication".
 Sending email is working if not done by workflow task.
 We did debug the vtiger installation (using PHP and Eclipse) and did find
 a bug.

 Bug report:

 The bug is in "modules/Emails/mail.php".

 The check
 {{{#!php
 if($smtp_auth){
      $mail->SMTPAuth = true;   // turn on SMTP authentication
 }
 }}}
 will always set SMTPAuth to true, if the mailserver does not use
 authentication. This only happens if the script is run during
 "vtigercron.sh".

 The bug is some lines above this code. If smtp_auth is not set, the
 database will be asked. The database returns a string "false".
 The php code will ask "if('false')", which is always true.

 Patch recommendation:

 To fix that, the code in mail.php need to be changed. At the posistion,
 where the request from database will be checked against "1" or "true", you
 need to set $smtp_auth to false using 'else'.

 Please replace:
 {{{#!php
     if($smtp_auth == "1" || $smtp_auth == "true"){
         $smtp_auth = true;
     }
 }}}
 with:
 {{{#!php
     if($smtp_auth == "1" || $smtp_auth == "true"){
         $smtp_auth = true;
     } else {
          // convert string query_result to boolean
          $smtp_auth = false;
     }
 }}}


 We fixed that inside our installation.

--
Ticket URL: <http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/8297>
Vtiger development <http://trac.vtiger.com/>
Vtiger CRM


More information about the vtigercrm-commits mailing list