add an smtp_port variable

This commit is contained in:
Andreas Zweili 2017-03-13 13:56:57 +01:00
parent 0ff71fde61
commit 0e0dcdc7d0
2 changed files with 4 additions and 0 deletions

View File

@ -1,4 +1,5 @@
[DEFAULT]
smtp_server: smtp.switchplus-mail.ch
smtp_port: 465
sender_address: no-reply@2li.ch
password: foo

View File

@ -56,6 +56,7 @@ class Configuration():
self.smtp_server = ""
self.sender_address = ""
self.check_location()
self.smtp_port()
def check_location(self):
# setup the config parser
@ -79,6 +80,8 @@ class Configuration():
self.password = self.config['DEFAULT']['password']
# assign the smtp_server variable
self.smtp_server = self.config['DEFAULT']['smtp_server']
# assign the smtp_port variable
self.smtp_port = self.config['DEFAULT']['smtp_port']
# assign the email_address variable
self.sender_address = self.config['DEFAULT']['sender_address']