The example configuration file makes it appear that the SMTP port is 
configurable.  Make it so.

Signed-off-by: Bryan Larsen <[EMAIL PROTECTED]>
---

 stgit/commands/mail.py |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/stgit/commands/mail.py b/stgit/commands/mail.py
--- a/stgit/commands/mail.py
+++ b/stgit/commands/mail.py
@@ -68,6 +68,12 @@ def __parse_addresses(string):
 def __send_message(smtpserver, from_addr, to_addr_list, msg, sleep):
     """Send the message using the given SMTP server
     """
+    if smtpserver.find(':')==-1:
+        smtpport=25
+    else:
+        smtpport=int(smtpserver[smtpserver.find(':')+1:])
+        smtpserver=smtpserver[:smtpserver.find(':')]
+
     try:
         s = smtplib.SMTP(smtpserver)
     except Exception, err:

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to