git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 1/1] Support configurable SMTP port for stg mail.

From
Bryan larsen <bryanlarsen@yahoo.com>
Date
Jul 21, 2005, 20:18 UTC
Message-ID
<20050721201832.8000.49433.stgit@h164.c77.b0.tor.eicat.ca>
The example configuration file makes it appear that the SMTP port is configurable.  Make it so.
Signed-off-by: Bryan Larsen <bryan.larsen@gmail.com>
---
 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:
Message 1 of 1 in “Support configurable SMTP port for stg mail.”
  1. 1/1 Support configurable SMTP port for stg mail.Bryan larsen, Jul 21, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.