summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorviega1998-05-28 23:07:06 +0000
committerviega1998-05-28 23:07:06 +0000
commit613a001b4794eed9e0135f0f1406bb27bc04faf8 (patch)
treec4ebd2656c576c610e2f8913c16533794564f2e3
parentbe798034fdaf51a4c13368e17c07d2f48f6f6099 (diff)
downloadmailman-613a001b4794eed9e0135f0f1406bb27bc04faf8.tar.gz
mailman-613a001b4794eed9e0135f0f1406bb27bc04faf8.tar.zst
mailman-613a001b4794eed9e0135f0f1406bb27bc04faf8.zip
Script that contacts port 25 to send mail. It currently uses my smtplib.py
and not the one that now comes w/ Python due to some UI concerns. When I have the time, I'll change it to use the standard one.
-rwxr-xr-xmail/contact_transport36
1 files changed, 36 insertions, 0 deletions
diff --git a/mail/contact_transport b/mail/contact_transport
new file mode 100755
index 000000000..f3517e8c3
--- /dev/null
+++ b/mail/contact_transport
@@ -0,0 +1,36 @@
+#! /usr/bin/env python
+#
+# Copyright (C) 1998 by the Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+import sys, os
+import paths
+import smtplib,mm_cfg
+
+
+from_addr = sys.argv[1]
+tmp_file = sys.argv[2]
+to_addrs = sys.argv[3:]
+
+file = open(tmp_file, "r")
+text = file.read()
+file.close()
+con = smtplib.SmtpConnection(mm_cfg.SMTPHOST)
+con.helo(mm_cfg.DEFAULT_HOST_NAME)
+con.send(to=to_addrs, frm=from_addr, text=text)
+con.quit()
+os.unlink(tmp_file)
+