From 2e49cfec896ede617654a6748da0f0d4278fc560 Mon Sep 17 00:00:00 2001 From: Vincent Le Gallic Date: Wed, 8 May 2013 05:46:07 +0200 Subject: [PATCH] oubli --- cranslib/mail/__init__.py | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 cranslib/mail/__init__.py diff --git a/cranslib/mail/__init__.py b/cranslib/mail/__init__.py deleted file mode 100644 index 339b9083..00000000 --- a/cranslib/mail/__init__.py +++ /dev/null @@ -1,25 +0,0 @@ -""" -__init__.py - - Fonction de base pour les mails. - -Copyright (c) 2006 by www.crans.org -""" - -SENDMAIL = "/usr/sbin/sendmail" # sendmail location - -def quickSend(From=None, To=None, Subject=None, Text=None, disconnect_on_bounce=0): - """envoie d'un mail""" - OPTIONS = ' -t' #extract recipient from headers - if disconnect_on_bounce: - OPTIONS+= ' -V -f bounces' - from os import popen - p = popen("%s -t %s" % (SENDMAIL, OPTIONS), "w") - p.write("From: %s\n" % From) - p.write("To: %s\n" % To) - p.write("Subject: %s\n" % Subject) - p.write("\n") # blank line separating headers from body - p.write("%s\n" % Text) - sts = p.close() - if sts: - print "Sendmail exit status", sts