Hi,
I'm using projeqtor V4.0.05.
I have setup the tool in order to send emails with smtp authentication, this don't work since we use ssl.
The issue is coming from the file projector/tool/projector.php at line 697 where there is a hard code of the variable $SMTPSecure to 'tls';
I have modified to 'ssl' in my case, withoiut changing any other parameter and then the tool could send emails.
Since there no parameter to specify wheter to use ssl or tls, I suggest to add a parameter for this.
Regards,
Aziz
Yes, default is TLS.
But you may specify another protocole in the host name : ssl://myhost will work.
This is the code just below line 697 in projector.php.
This is also explian in the online manual.
RTFM 👿
I have tried to setup the field server in the global parameters to ssl://xx.xx.xx.xx, but the mail was not sent, until I fixed this in the file projector.php.
here below the log of sending the email:
2013-12-04 16:39:51 ** ERROR ** Error sending mail
2013-12-04 16:39:51 ** ERROR ** SMTP Server : xx.xx.xx.xx
2013-12-04 16:39:51 ** ERROR ** SMTP Port : 465
2013-12-04 16:39:51 ** ERROR ** Mail stored in Database : #440
2013-12-04 16:39:51 ** ERROR ** PHPMail error : SMTP connect() failed.
2013-12-04 16:39:51 ** ERROR ** PHPMail debug : 2013-12-04 16:39:51 SERVER -> CLIENT:
2013-12-04 16:39:51 CLIENT -> SERVER: EHLO localhost
2013-12-04 16:39:51 SERVER -> CLIENT:
2013-12-04 16:39:51 SMTP ERROR: EHLO command failed:
2013-12-04 16:39:51 SMTP NOTICE: EOF caught while checking if connected
SMTP connect() failed.
Regards,
Aziz
Very weird as it works for me and code is really explicit.
It works really fine with ssl://smtp.gmail.com, on port 465.
Are you sure you correctly defined the host with ssl:// (double slash) ?
Hi,
Here attached a screen shot of the global parameters and the log of the send email operation.
Regards,
Aziz
Are you sure your login name should contain your domain name ?
When I connect to gmail smtp server I must not provide domain name in the account name.
No this is not mandatory, chaned it but still gettting the same error (smtpserver in the global parameters set to ssl://mail.domain.ma and the file projector.php not changed).
And if you just remove "ssl://" from the host name and change in the code "tls" into "ssl", all works fine ?
Without any other change ?
Indeed, changing in the code 'tls' into 'ssl' works fine.
Could you try to change lines 693 to 702 in /tool/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';
if (strpos($phpmailer->Host,'://')) {
$phpmailer->SMTPSecure=substr($phpmailer->Host,0,strpos($phpmailer->Host,'://'));
$phpmailer->Host=substr($phpmailer->Host,strpos($phpmailer->Host,'://')+3);
}
}
with these ones
if ($paramMailSmtpUsername and $paramMailSmtpPassword) {
debugLog("Authentified connexion with Host='".$phpmailer->Host."'");
$phpmailer->SMTPAuth = true; // Enable SMTP authentication
$phpmailer->Username = $paramMailSmtpUsername; // SMTP username
$phpmailer->Password = $paramMailSmtpPassword; // SMTP password
$phpmailer->SMTPSecure = 'tls';
if (strpos($phpmailer->Host,'://')) {
$phpmailer->SMTPSecure=substr($phpmailer->Host,0,strpos($phpmailer->Host,'://'));
$phpmailer->Host=substr($phpmailer->Host,strpos($phpmailer->Host,'://')+3);
}
debugLog("SMTPSecure='".$phpmailer->SMTPSecure."'");
debugLog("Host='".$phpmailer->Host."'");
}
(3 debug lines added)
Then test again non working configuration and post log result (or send it to me)
Regards.
Here is the log of the sending email action:
2013-12-10 17:23:54 ----- DEBUG ----- Authentified connexion with Host='xx.xx.xx.xx'
2013-12-10 17:23:54 ----- DEBUG ----- SMTPSecure='tls'
2013-12-10 17:23:54 ----- DEBUG ----- Host='xx.xx.xx.xx'
2013-12-10 17:24:04 ** ERROR ** ERROR **
2013-12-10 17:24:04 ** ERROR ** on file 'C:xampphtdocsprojeqtorexternalPHPMailerclass.smtp.php' at line (218)
2013-12-10 17:24:04 ** ERROR ** cause = stream_socket_client():
2013-12-10 17:24:04 ** ERROR ** Error sending mail
2013-12-10 17:24:04 ** ERROR ** SMTP Server : xx.xx.xx.xx
2013-12-10 17:24:04 ** ERROR ** SMTP Port : 465
2013-12-10 17:24:04 ** ERROR ** Mail stored in Database : #451
2013-12-10 17:24:04 ** ERROR ** PHPMail error : SMTP connect() failed.
2013-12-10 17:24:04 ** ERROR ***** PHPMail debug : 2013-12-10 17:24:04 SMTP ERROR: Failed to connect to server: Une tentative de connexion a échoué car le parti connecté n’a pas répondu convenablement au-delà d’une certaine durée ou une connexion établie a échoué car l’hôte de connexion n’a pas répondu.
(10060)
SMTP connect() failed.
Hi,
I guess you replaced your real host name with 'xx.xx.xx.xx'
In fact, what you tried will sure not work.
You must set your host to 'ssl://xx.xx.xx.xx'.
Then try again.
Bonjour,
Je me permets de relancer ce topic parce que j'ai aussi un problème d'envoi de courriel.
Ci-dessous la copie du fichier log, mon hébergeur imposant l'utilisation du SSL, j'ai donc mis 465 en port SMTP et...
2014-05-31 19:51:43 ** ERROR ** Error sending mail
2014-05-31 19:51:43 ** ERROR ** SMTP Server : mail.shost.ca
2014-05-31 19:51:43 ** ERROR ** SMTP Port : 465
2014-05-31 19:51:43 ** ERROR ** Mail stored in Database : #15
2014-05-31 19:51:43 ** ERROR ** PHPMail error : SMTP connect() failed.
2014-05-31 19:51:43 ** ERROR ** PHPMail debug :
2014-05-31 20:00:11 ** ERROR ** Error sending mail
2014-05-31 20:00:11 ** ERROR ** SMTP Server : ssl://mail.shost.ca
2014-05-31 20:00:11 ** ERROR ** SMTP Port : 465
2014-05-31 20:00:11 ** ERROR ** Mail stored in Database : #16
2014-05-31 20:00:11 ** ERROR ** PHPMail error : SMTP connect() failed.
2014-05-31 20:00:11 ** ERROR ** PHPMail debug :
Est-ce que quelqu'un a une idée de ce qu'il faut faire ?
D'avance merci.
PS : j'ai fait un ping sur le serveur pour vérifier qu'il fonctionne.
PLEASE POST IN ENGLISH !
___
Looking at shost.ca FAQ, it seems that correct configuration should be :
- server : shost.ca
- port : 587
- protocole : TLS
Also check user/password for authentication.