Forum

v2.2.0:: AutoMail I...
 
Notifications
Retirer tout

v2.2.0:: AutoMail Issue

33 Posts
3 Utilisateurs
0 Reactions
30.5 {numéro}K Vu
(@babynus)
Posts: 14952
Membre Admin
 

Hi,
I just changed the code to :

 if (!$headers) {
    $eol=(isset($paramMailEol))?$paramMailEol:"rn";
    $headers  = 'MIME-Version: 1.0' . $eol;
    $headers .= 'Content-type: text/html; charset=utf-8' . $eol;
    $headers .= 'From: ' . (($sender)?$sender:$paramMailSender) . $eol;
    $headers .= 'Reply-To: ' . (($sender)?$sender:$paramMailReplyTo) . $eol;
    $headers .= 'Content-Transfer-Encoding: 8bit' . $eol;
    $headers .= 'X-Mailer: PHP/' . phpversion();
  }

This way, you'll just have to define

$paramMailEol="n";

in the parameters.php file, and your config will always be valid, even if you deply new version.
Will be deployed in V2.4.2.


 
Posté : 3 Août PM 18:088
(@gvecchi)
Posts: 38
Active Member
 

Really good.


 
Posté : 3 Août PM 18:088
(@gvecchi)
Posts: 38
Active Member
 

It seems not working.

What does

$eol=(isset($paramMailEol))?$paramMailEol:"rn";

means?

If $eol is not set, set $eol as "rn"?

Or maybe files/config/parameters.php needs to be included?


 
Posté : 9 Août AM 10:088
(@gvecchi)
Posts: 38
Active Member
 

Do you mean files/config/parameters.php or tool/parameters.php ?


 
Posté : 9 Août AM 10:088
(@babynus)
Posts: 14952
Membre Admin
 

Do you mean files/config/parameters.php or tool/parameters.php ?

I mean parameter file defined in /tool/parametersLocation.php. By default it is /files/config/parameters.php, but it is advised to chnges its location (to put it out of web access).


 
Posté : 9 Août AM 11:088
(@babynus)
Posts: 14952
Membre Admin
 

Do you mean files/config/parameters.php or tool/parameters.php ?

I mean parameter file defined in /tool/parametersLocation.php. By default it is /files/config/parameters.php, but it is advised to changes its location (to put it out of web access).


 
Posté : 9 Août AM 11:088
(@gvecchi)
Posts: 38
Active Member
 

I set $paramMailEol in files/config/parameters.php but it doen's work.


 
Posté : 9 Août AM 11:088
(@babynus)
Posts: 14952
Membre Admin
 

With V2.4.2 or V2.4.3 ?


 
Posté : 9 Août PM 13:088
(@gvecchi)
Posts: 38
Active Member
 

2.3.0


 
Posté : 9 Août PM 13:088
(@babynus)
Posts: 14952
Membre Admin
 

Normal it does not work : implementation comes with V2.4.2... :whistle:


 
Posté : 9 Août PM 13:088
(@gvecchi)
Posts: 38
Active Member
 

I modified also tool/projector.php as you typed. I thought it do the trick, isn't it?


 
Posté : 9 Août PM 14:088
(@babynus)
Posts: 14952
Membre Admin
 

Yes, it should.

Could you try to add a debug line :

if (!$headers) {
    $eol=(isset($paramMailEol))?$paramMailEol:"rn";
debugLog("NewLine=".strlen($eol).":".nin2hex($eol));
    $headers  = 'MIME-Version: 1.0' . $eol;
    $headers .= 'Content-type: text/html; charset=utf-8' . $eol;
    $headers .= 'From: ' . (($sender)?$sender:$paramMailSender) . $eol;
    $headers .= 'Reply-To: ' . (($sender)?$sender:$paramMailReplyTo) . $eol;
    $headers .= 'Content-Transfer-Encoding: 8bit' . $eol;
    $headers .= 'X-Mailer: PHP/' . phpversion();
  }

Then try again a copy here the log file.


 
Posté : 9 Août PM 16:088
(@gvecchi)
Posts: 38
Active Member
 

If I append debug line, page hung trying sending mail notification (ex when assigne a task) and if I modify tool/projector.php

$eol=(isset($paramMailEol))?$paramMailEol:"n";

it works.


 
Posté : 9 Août PM 16:088
(@babynus)
Posts: 14952
Membre Admin
 

Sorry there was a typo in the debug line :

debugLog("NewLine=".strlen($eol).":".bin2hex($eol));

I just found the issue, line 561 must be completed:

global $paramMailSender, $paramMailReplyTo, $paramMailSmtpServer, $paramMailSmtpPort, $paramMailSendmailPath, $paramMailEol;

You can remove the debug line !

Then it should work.
I include this fox in next version, so if you change it, you'll retrieve your parametering on next versions.


 
Posté : 9 Août PM 18:088
(@gvecchi)
Posts: 38
Active Member
 

Yeah man, now it works 😉


 
Posté : 9 Août PM 18:088
Page 2 / 3
Share:
Retour en haut