bernhard: utils/testing kmail-send-test-email-aegyptenissue659-1.py, NONE, 1.1
cvs at kolab.org
cvs at kolab.org
Thu Nov 2 15:39:31 CET 2006
Author: bernhard
Update of /kolabrepository/utils/testing
In directory doto:/tmp/cvs-serv20332
Added Files:
kmail-send-test-email-aegyptenissue659-1.py
Log Message:
Adding test helping script for aegyptenissue659.
--- NEW FILE: kmail-send-test-email-aegyptenissue659-1.py ---
#!/usr/bin/env python
"""Send Email to reproduce https://intevation.de/roundup/aegypten/issue659.
Usage ./$progname <emailaddress>
This script is Free Software under the GNU General Public License >=v2.
bernhard at intevation.de
"""
#20061030 Bernhard initial
__version__="$Revision: 1.1 $"[10:-1]
import sys
import smtplib
import string
msg="""To: Bernhard Reiter <bernhard at intevation.de>
Subject: Test Mail aegypten/issue659 rev02
From: Sascha Wilde <wilde at intevation.de>
Date: Mon, 30 Oct 2006 15:22:12 +0100
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
micalg=pgp-sha1; protocol="application/pgp-signature"
--=-=-=
Content-Transfer-Encoding: quoted-printable
Eine signierte Testmail.
=2D-=20
Sascha Wilde Intevation GmbH
wilde at intevation.de intevation at intevation.de
http://www.intevation.de/~wilde/ http://www.intevation.de/
--=-=-=
Content-Type: application/pgp-signature
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
iD8DBQFFRgpeuyGFFEu4ZWgRAgucAJ9tvc7Pxx2SZgXDWCYvY6jr5Pa3kwCdGN/y
OpTLo1J8XeeCCeO7lNIkzok=
=y4aq
-----END PGP SIGNATURE-----
--=-=-=--
"""
toadd = [sys.argv[1]]
#toadd = ["test.account at example.org"] # list of to addresses
smtpserver='localhost'
# if you set a loginname, aconnection via TLS and authentification is tried
loginname = None
password = None
fromadd="nobody at example.org"
basemsg=("From: %s\r\nTo: %s\r\n%%s\r\n" % (fromadd, string.join(toadd, ", ")))
headers="MIME-Version: 1.0\r\n"+ \
"Content-Type: text/plain;\r\n"+ \
" charset=\"iso-8859-1\"\r\n"+ \
"Content-Transfer-Encoding: 8bit\r\n"
basesubject="Subject: Test for aegypten/issue659\r\n"
server=smtplib.SMTP(smtpserver)
#server.set_debuglevel(1)
if loginname != None and password != None:
server.starttls()
server.login(loginname,password)
server.sendmail(fromadd,toadd,msg)
server.quit()
#sys.stdout.write("\n")
More information about the commits
mailing list