mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-05-07 15:01:34 +00:00
Merge with Laurent Bigonville's patch to allow to choose a SMTP port.
This commit is contained in:
commit
b3e31310db
4
debian/changelog
vendored
4
debian/changelog
vendored
@ -1,7 +1,11 @@
|
|||||||
ubuntu-dev-tools (0.19) UNRELEASED; urgency=low
|
ubuntu-dev-tools (0.19) UNRELEASED; urgency=low
|
||||||
|
|
||||||
|
[ Siegfried-Angel Gevatter Pujals (RainCT) ]
|
||||||
* requestsync: allow to customize the SMTP server (LP: #144244)
|
* requestsync: allow to customize the SMTP server (LP: #144244)
|
||||||
* Add a short description for requestsync to the README file.
|
* Add a short description for requestsync to the README file.
|
||||||
|
|
||||||
|
[ Laurent Bigonville ]
|
||||||
|
* requestsync: allow to customize the SMTP port
|
||||||
|
|
||||||
-- Siegfried-Angel Gevatter Pujals (RainCT) <siggi.gevatter@gmail.com> Mon, 1 Oct 2007 18:04:14 +0200
|
-- Siegfried-Angel Gevatter Pujals (RainCT) <siggi.gevatter@gmail.com> Mon, 1 Oct 2007 18:04:14 +0200
|
||||||
|
|
||||||
|
12
requestsync
12
requestsync
@ -202,8 +202,15 @@ if mailserver:
|
|||||||
else :
|
else :
|
||||||
mailserver = 'fiordland.ubuntu.com'
|
mailserver = 'fiordland.ubuntu.com'
|
||||||
|
|
||||||
|
# get server port
|
||||||
|
mailserver_port = os.getenv('DEBSMTP_PORT')
|
||||||
|
if mailserver_port:
|
||||||
|
print 'Using custom SMTP port:', mailserver_port
|
||||||
|
else:
|
||||||
|
mailserver_port = 25
|
||||||
|
|
||||||
# connect to the server
|
# connect to the server
|
||||||
s = smtplib.SMTP(mailserver)
|
s = smtplib.SMTP(mailserver, mailserver_port)
|
||||||
|
|
||||||
# authenticate to the server
|
# authenticate to the server
|
||||||
mailserver_user = os.getenv('DEBSMTP_USER')
|
mailserver_user = os.getenv('DEBSMTP_USER')
|
||||||
@ -214,6 +221,9 @@ if mailserver_user and mailserver_pass:
|
|||||||
except smtplib.SMTPAuthenticationError:
|
except smtplib.SMTPAuthenticationError:
|
||||||
print 'Error authenticating to the server: invalid username and password.'
|
print 'Error authenticating to the server: invalid username and password.'
|
||||||
s.quit(); sys.exit(1)
|
s.quit(); sys.exit(1)
|
||||||
|
except:
|
||||||
|
print 'Unknown SMTP error.'
|
||||||
|
s.quit(); sys.exit(1)
|
||||||
|
|
||||||
|
|
||||||
s.sendmail(myemailaddr, to, mail)
|
s.sendmail(myemailaddr, to, mail)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user