In LM 3.3.0, creating an user generates an error:
Could not instantiate mail function. /var/www/lizmap-web-client-3.3.0/lib/phpMailer/class.phpmailer.php 1507
However, the user is created anyway. Possibly due to a missing config for SMTP on the server?
Hello, we are facing the same issue and it's heavily impacting us.
We had exactly the same problem described by @pcav with a Ubuntu 18.04 machine with LM 3.3.3.
We noticed that Sendmail wasn't installed so after the installation the error message disappeared.
Unfortunately also if we don't have the error anymore and although the software is telling us that the email has been sent, it isn't!
We try with different emails and email providers and checked also inside the spam.
If we try to go under the user profile and click the button to send again the verification email, after loading a while the application crashes.
Right now we are not able to add other users manually because the password field is not visible and we can't activate new accounts because they are not receiving any email.
Could you please help us out in solving this issue?
Thanks
Could you please help us out in solving this issue?
@H4M1O https://github.com/3liz/lizmap-documentation/issues/148#issuecomment-559021361
@gioman thanks for the answer, although I don't like it...
It could be useful as a workaround, but it's not a solution.
This is configured like this because allowing a user changing the password of an other user is a very bad practice in terms of security. Even administrators should not know passwords of other users ! And if an administrator generates itself the password of an other user, it means that he must send the password to the user, and the password is often sent using an insecure
communication channel, like mails.
I also found out that when I am creating a new user, the system is complaining, saying that the user already exists.

It could be useful as a workaround, but it's not a solution.
@H4M1O why? adding that option allows the admin to create users and define their password. Isn't what you are looking for?
Nope, I don't want provision user password, either knowing their credentials.
What I am looking for is the mail function to work as expected so that once I created the account the users will receive an email with a link where they will be able to create their own password.
Again, we are missing the point, the whole mail notification doesn't work at all for me.
here is my option for doing it: https://github.com/3liz/lizmap-web-client/issues/615#issuecomment-308778497
Nope, I don't want provision user password, either knowing their credentials.
@H4M1O sorry for having tried being helpful, it won't happen again.
Again, we are missing the point, the whole mail notification doesn't work at all for me.
as pointed here https://github.com/3liz/lizmap-web-client/issues/1365#issuecomment-594120216 it maybe very well that the problem is on your side...
bye
@gioman when I am writing I am sharp and direct, but I do understand you were trying to help.
I thank you for your help because indeed I temporary used your solution until I will find a proper one, I didn't mean to be rude towards you, get to the point quickly.
The frustration is not with you, but with the fact that with previous version LM was working fine.
@josemvm I will need to try that out, although I could have some issues, with the hostname part primarily because in my case the hostname could change over time, and this means I will have to update every time the Sendmail configuration. If it works just by keeping localhost, then it should be a definitive solution.
Same problem for me with 3.2.10, release 3_3 and 3.3.6 versions.
In the same server, with same settings, users can registers without problems with 3.1.1 version.
Any help?
P.s. I' m using ssmtp
Solved, setting up correctly SSMTP conf file!
Hello,
I am having trouble initiating the mail function on Lizmap 3.3 on Windows x64.
The LizMap 3.3 documentation is confusing or incomplete in this regard.
Any pointers would be greatly appreciated.
The error message is at the bottom of the this message.
Note that I get errors from both ports 465 (SMTP connect() failed) and 587 (SMTP Error: Could not authenticate)
I have appended the following lines to
[mailer]
webmasterEmail="[email protected]"
webmasterName="me" #this could be anything
mailerType="smtp"
smtpHost="smtp.domain.com" #this is the full name of the email SMTP server
smtpPort=465
smtpSecure="ssl"
smtpHelo="username" #without @domain - tested with openssl cmd connection to SMTP server
smtpAuth="on"
smtpUsername="[email protected]"
smtpPassword="pwd" #this is the SMTP password, not the main email account's pwd
smtpTimeout=10
In
[mailer]
webmasterEmail="[email protected]" #full email address
webmasterName="me" #this could be anything
On the main LizMap administration webpage (http://localhost/webgis/admin.php/admin/config/) I have the following settings:
E-mail where to send notifications = "[email protected]"
Sender address of e-mails = "[email protected]"
ERROR MESSAGE in http://localhost/webgis/admin.php/admin/logs/:
2020-09-17 11:58:47 ::1 error jMailer error:
SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
2020-09-17 11:58:47 ::1 error jMailer error:
SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
2020-09-17 11:58:47 ::1 error 2020-09-17 11:58:47 ::1 [2] SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting C:\webserver\lizmap\prod\release_3_3\lib\phpMailer\class.phpmailer.php 1558
/webgis/admin.php/auth/password_reset_admin/send
array ( 'module' => 'jcommunity', 'action' => 'password_reset_admin:send', 'pass_login' => 'admin', )
0 PHPMailer->smtpSend() C:\webserver\lizmap\prod\release_3_3\lib\jelix\utils\jMailer.class.php : 481
1 jMailer->smtpSend() C:\webserver\lizmap\prod\release_3_3\lib\phpMailer\class.phpmailer.php : 1340
2 PHPMailer->postSend() C:\webserver\lizmap\prod\release_3_3\lib\phpMailer\class.phpmailer.php : 1215
3 PHPMailer->send() C:\webserver\lizmap\prod\release_3_3\lib\jelix\utils\jMailer.class.php : 326
4 jMailer->Send() C:\webserver\lizmap\prod\release_3_3\lib\vendor-modules\jcommunity\lib\PasswordReset.php : 89
5 Jelix\JCommunity\PasswordReset->sendEmail() C:\webserver\lizmap\prod\release_3_3\lib\vendor-modules\jcommunity\controllers\password_reset_admin.classic.php : 82
6 password_reset_adminCtrl->send() C:\webserver\lizmap\prod\release_3_3\lib\jelix\core\jCoordinator.class.php : 225
7 jCoordinator->process() C:\webserver\lizmap\prod\release_3_3\lizmap\www\admin.php : 23
Many thanks in advance,
Hiya!
This issue has gone quiet. 馃懟
We get a few questions in the bug tracker, so we currently slowly closing issues.
If we missed this issue or if you want to keep it open, please reply here.
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request.
Thanks for being a part of the Lizmap community! 馃