More work

* Refactored code out of common/ into servatrice/
 * added smtp client library
 * disable registration when connected
 * validate email address
 * send activation token via email
This commit is contained in:
Fabio Bas
2015-05-24 23:02:51 +02:00
parent 8cf4461616
commit 471f6371b5
38 changed files with 2699 additions and 146 deletions

View File

@@ -65,6 +65,39 @@ regonly=0
; to get their account activated. Default true.
;requireemail=true
[smtp]
; Connectin type: currently supported method are "tcp", "ssl" and "tls"
connection=tcp
; Auth type: currently supported method are "plain" and "login"
auth=plain
; Hostname or IP addres of the smtp server
host=localhost
; Smtp port number of the smtp server. Usual values are 25 or 587 for tcp, 465 for ssl
port=25
; Username: this typically matches the "from" email address
username=root@localhost
; Password for the username
password=foobar
; Sender email address: the "from" email address
email=root@localhost
; Sender email name
name="Cockatrice server"
; Email subject
subject="Cockatrice server account activation token"
; Email body. You can use these tags here: %username %token
; They will be substituted with the actual values in the email
;
body="Hi %username, thank our for registering on our Cockatrice server\r\nHere's the activation token you need to supply for activatin your account:\r\n\r\n%token\r\n\r\nHappy gaming!"
[database]