From 613a001b4794eed9e0135f0f1406bb27bc04faf8 Mon Sep 17 00:00:00 2001 From: viega Date: Thu, 28 May 1998 23:07:06 +0000 Subject: 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. --- mail/contact_transport | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100755 mail/contact_transport 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) + -- cgit v1.3.1