3liz / lizmap-web-client

Transfer a QGIS project on a server, Lizmap is providing the web interface to browse it
https://www.lizmap.com
Mozilla Public License 2.0
260 stars 143 forks source link

Administrator e-mail notifications #615

Closed virtusmankind closed 12 hours ago

virtusmankind commented 7 years ago

Following Lizmap guide

Administrator e-mail If a valid e-mail address is given, then the Lizmap Web Client notifications will be sent. For example, each account creation request via the registration form generates an email sent to this address.

I set a valid email but I do not receive any email when a user create an account. Is it a bug or I need something else installed on my server (a specific mail sender?)

jonnyforestGIS commented 7 years ago

Hi, @virtusmankind you are using windows server ou linux server? For my case in the Windows Server i need to change the information in the php.ini


[mail function]
; For Win32 only.
; http://php.net/smtp
SMTP = smtp.domain.com ; smpt of your email domain server
; http://php.net/smtp-port
smtp_port = 25 ;port of your smtp

; For Win32 only.
; http://php.net/sendmail-from
sendmail_from = user@domain.com ; email of admin email

I hope this help you.

Cheers, João Gaspar

virtusmankind commented 7 years ago

Hi @jonnyforestGIS I'm using a Linux (Debian) server. I'll try to set the information given in the php configuration on my server side. Stay tuned for further news!

virtusmankind commented 7 years ago

I guess I have to change some information in php.in too. But in which path inside /etc/php5/?

  1. /apache2/php.ini
  2. /cgi/php.ini
  3. /cli/php.ini

[mail function] ; For Win32 only. ; http://php.net/smtp SMTP = localhost ; http://php.net/smtp-port smtp_port = 25

; For Win32 only. ; http://php.net/sendmail-from ;sendmail_from = me@example.com

; For Unix only. You may supply arguments as well (default: "sendmail -t -i"). ; http://php.net/sendmail-path ;sendmail_path =

; Force the addition of the specified parameters to be passed as extra parameters ; to the sendmail binary. These parameters will always replace the value of ; the 5th parameter to mail(). ;mail.force_extra_parameters =

; Add X-PHP-Originating-Script: that will include uid of the script followed by the filename mail.add_x_header = On

; The path to a log file that will log all mail() calls. Log entries include ; the full path of the script, line number, To address and headers. ;mail.log = ; Log mail to syslog (Event Log on Windows). ;mail.log = syslog`

Which parameters should I set?

jonnyforestGIS commented 7 years ago

@virtusmankind please check this link: https://thewireframecommunity.com/node/39 Note: this site will give and error ssl certificate on website add as exception to read the post of this website.

or https://www.quackit.com/php/tutorial/php_mail_configuration.cfm

jonnyforestGIS commented 7 years ago

This kind of configuration can be use in the documentation. @rldhont can you put in this the tag doc-needed. I'm trying to get some free time to help in update the

Cheers, João Gaspar

virtusmankind commented 7 years ago

Well done @jonnyforestGIS. I configure SSMTP on serverside and I obtain what I need. Now when a new account is registered, I receive an email with the request. Thanks a lot

virtusmankind commented 7 years ago

Just wondering.... Administrator e-mail notifications it's a great feature to alert administrator that a new account is registered. Is there any chance to set an autoreply to the new user with a reminder message like this:

"Thanks for registration. Your login credentials are the following: Username: %username Password: %password Thank you

WebGis Administrator"

mdouchin commented 7 years ago

An email confirming the registration would be good indeed. But with NO password inside Can you open an issue or PR for this ?

josemvm commented 7 years ago

hi @virtusmankind and all other linux users

when this question was opened, i found a bit strange matter because in my case the email notifications always worked fine, but i didn't remenber how or why...

to do this, you only need to have the sendmail package installed on your linux system

an easy and alternative solution (sendmail): https://gist.github.com/adamstac/7462202

all the best

laurentj commented 6 years ago

An other alternative is to configure the mailer used by Lizmap. You can configure SMTP credentials directly into localconfig.ini.php. See the documentation of Jelix.

If you don't receive email, and your web server is sending directly emails with sendmail or other smtp client, be sure the IP of web server is set into a SPF record into your Domain name configuration (see your domain provider) else mail servers may reject the email, or mark it as spam.

aeduard commented 4 years ago

I've found a nice, simple tutorial to install Postfix which worked for me with Ubuntu 20.04. I will link it here, hope it helps other users also: link.

Gustry commented 12 hours ago

This GitHub repository accept only "bug reports". Questions must go to another channel such as Discourse for instance.

if you think it's a proper bug, please open a new detailed bug report, with the latest version of Lizmap available.