Set login name as default email from address

This commit is contained in:
Cédric Krier committed 2023-03-10 13:10:08 +01:00
1 parent 7ea4c1353a
commit be8d6807ba
2 files changed
+4

No files matched your search

+2
View File
@@ -445,6 +445,8 @@ For example::
from: "Company Inc" <info@example.com>
Default: The login name of the :abbr:`OS (Operating System)` user.
retry
~~~~~
+2
View File
@@ -4,6 +4,7 @@ import configparser
import logging
import os
import urllib.parse
from getpass import getuser
import __main__ as main
@@ -82,6 +83,7 @@ class TrytonConfigParser(configparser.ConfigParser):
self.add_section('ssl')
self.add_section('email')
self.set('email', 'uri', 'smtp://localhost:25')
self.set('email', 'from', getuser())
self.add_section('session')
self.set('session', 'authentications', 'password')
self.set('session', 'max_age', str(60 * 60 * 24 * 30))