View ProjeQtOr On SourceForge.net
ProjeQtOr - Project Management Tool
Supportez nous sur Capterra
OIN - Open Invention Network
ProjeQtOr free project management software - Configuration smtp mail without encryption - ProjeQtOr

Prochaines sessions de formation

Les prochaines formations et démonstrations sont ouvertes, inscrivez-vous rapidement !

 

Démonstration de ProjeQtOr

(gratuit, sur inscription)

Mardi 23 avril (10h30-12h)

Jeudi 16 mai (16h-17h30)

Jeudi 13 juin (10h30-12h)

 
 

Planifiez avec ProjeQtOr

3 et 4 avril (9h - 12h30)

 
 

Administrez avec ProjeQtOr

10 et 11 avril (9h - 12h30)

 

 

 
 

Configuration smtp mail without encryption

More
04 Mar 2016 12:35 #1 by ustas
Hello.

In version 5.2.4 practically impossible configure SMTP emailing without encryption.

If set login/pass, Projeqtor always enable encryption, nowise show this in the interface; this is very not trivial and it is just flat out confusing. This brings to that sort of errors, without any words of reason and status of enabled tls:
2016-03-02 20:37:37.531 ***** ERROR ***** Error sending mail
2016-03-02 20:37:37.532 ***** ERROR *****    SMTP Server :  10.0.1.1
2016-03-02 20:37:37.532 ***** ERROR *****    SMTP Port : 25
2016-03-02 20:37:37.532 ***** ERROR *****    Mail stored in Database : #21
2016-03-02 20:37:37.532 ***** ERROR *****    PHPMail error : SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
2016-03-02 20:37:37.532 ***** ERROR *****    PHPMail debug :
Search of the forum not give result for me:

babynus wrote: Ssl is not mandatory, just default if authentication is set and no protocolecspecified.
To specify other protocole, just enter it before host name :
tls://hostname
Sorry, but this is explained in the user manual.
RTFM :evil:

babynus wrote: TLS uses (in standard) port 587
Port 465 is for SSL protocole.

If you dont specify protocole in host definition, protocole will be guessed from port
25 : standard smtp (not encrypted)
465 : SSL
587 : TLS

If you want to force TLS (for instance if you use TLS on a non standard port) ust specify it on host definition
smtp server : tls://mail.xxx.xx


In contrast to forum's message above, in the .ppt manual explain what tls uses by default for 25 port. But not describe how to disable encryption.



I do not know php, but i am found two way to solve it:

1. Define the server address with ' ://' in config/parameters.php. This is not work if try set it in "Global parameters" page, probably, because the first char space removed at writing to base.
$paramMailSmtpServer = ' ://address';

2. Fix this bug in a projeqtor.php.
  if ($paramMailSmtpUsername and $paramMailSmtpPassword) {
    $phpmailer->SMTPAuth = true; // Enable SMTP authentication
    $phpmailer->Username = $paramMailSmtpUsername; // SMTP username
    $phpmailer->Password = $paramMailSmtpPassword; // SMTP password
    $phpmailer->SMTPSecure = 'tls'; // default (for ports 25 and 587
    if ($paramMailSmtpPort == '465')
      $phpmailer->SMTPSecure = 'ssl'; // 465 is default for ssl
    if (strpos ( $phpmailer->Host, '://' )) {
      $phpmailer->SMTPSecure = substr ( $phpmailer->Host, 0, strpos ( $phpmailer->Host, '://' ) );
      $phpmailer->Host = substr ( $phpmailer->Host, strpos ( $phpmailer->Host, '://' ) + 3 );
    }
  }
Replace line 947
if (strpos ( $phpmailer->Host, '://' )) {
to, for example
if (strpos ( $phpmailer->Host, '://' ) !== false) {

In that case to be work '://address' and setting on а "Global parameters" page. But, again, the user is not possible to guess this way is turned off encryption..


Thank for a projeqtor.

P.S.
line 936, // $phpmailer->SMTPDebug=1;
->
2016-03-02 20:37:37.532 ***** ERROR ***** PHPMail debug :

P.S.2
Lacking a button to send a test email to verify your settings. (Like a redmine/openproject)
Attachments:

Please Connexion or Create an account to join the conversation.

More
04 Mar 2016 23:23 #2 by babynus
Thanks for your analysis

Fix will be included in V5.3.0 replacen lines from 947 :
if (strpos ( $phpmailer->Host, '://' )!==false) {
      $phpmailer->SMTPSecure = substr ( $phpmailer->Host, 0, strpos ( $phpmailer->Host, '://' ) );
      if ($phpmailer->SMTPSecure=="smtp") $phpmailer->SMTPSecure="";
      $phpmailer->Host = substr ( $phpmailer->Host, strpos ( $phpmailer->Host, '://' ) + 3 );
    }
With this fix, it will be possible to enter "smtp://myhost" as host to send authentified non encryted emails.
But I would always advise to send encrpyted emails B)

Idea of button to test email is good.
Request recorded as Ticket #1997

Babynus
Administrator of ProjeQtOr web site

Please Connexion or Create an account to join the conversation.

More
09 Mar 2016 17:28 #3 by ustas
Thank you.

babynus wrote: But I would always advise to send encrpyted emails B)


Undoubtedly, but i have no control over the mail server.

ustas wrote: line 936, // $phpmailer->SMTPDebug=1;
->
2016-03-02 20:37:37.532 ***** ERROR ***** PHPMail debug :


You do not enable the print of value "PHPMail debug"? Current message is empty.

Please Connexion or Create an account to join the conversation.

More
10 Mar 2016 14:01 #4 by babynus

if ($logLevel>='3') $phpmailer->SMTPDebug=1;

You're right, will give possibility to enable in V5.3 :
if ($logLevel>='3') $phpmailer->SMTPDebug=1;

Babynus
Administrator of ProjeQtOr web site

Please Connexion or Create an account to join the conversation.

More
10 Mar 2016 17:05 #5 by ustas
OK. Thanks.

Please Connexion or Create an account to join the conversation.

Moderators: babynusprotion
Time to create page: 0.045 seconds

Paramétrages de cookies

×

Cookies fonctionnels

Ce site utilise des cookies pour assurer son bon fonctionnement et ne peuvent pas être désactivés de nos systèmes. Nous ne les utilisons pas à des fins publicitaires. Si ces cookies sont bloqués, certaines parties du site ne pourront pas fonctionner.

Session

Veuillez vous connecter pour voir vos activités!

Autres cookies

Ce site web utilise un certain nombre de cookies pour gérer, par exemple, les sessions utilisateurs.