bernhard: utils/testing kmail-send-test-email-aegyptenissue743-1.py, NONE, 1.1
cvs at kolab.org
cvs at kolab.org
Thu Mar 15 16:25:36 CET 2007
Author: bernhard
Update of /kolabrepository/utils/testing
In directory doto:/tmp/cvs-serv367
Added Files:
kmail-send-test-email-aegyptenissue743-1.py
Log Message:
Adding test script for aegpyten/issue743.
--- NEW FILE: kmail-send-test-email-aegyptenissue743-1.py ---
#!/usr/bin/env python
"""Send Email to reproduce https://intevation.de/roundup/aegypten/issue734 .
Usage $progname <recipientemailaddress>
aegypten/issue734 is
(Moving email in dimap breaks signature, because lines removed)
In the source you can give smtp-server, password
and you can enable debug output.
This script is Free Software under the GNU General Public License >=v2.
bernhard at intevation.de
"""
#20070315 Bernhard initial
__version__="$Revision: 1.1 $"[10:-1]
import sys
import smtplib
import string
msg="""Subject: Eine signierte Mail
From: Sascha Wilde <wilde at intevation.de>
Date: Thu, 15 Mar 2007 15:16:02 +0100
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="==-=-=";
micalg=pgp-sha1; protocol="application/pgp-signature"
--==-=-=
Content-Type: multipart/mixed; boundary="=-=-="
--=-=-=
Hallo Bernhard
hier also die mail....
jetzt kommt gleich der Anhang...
3 ...
2 ...
1 ...
BOOOM
--=-=-=
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: attachment; filename=x.txt
Content-Transfer-Encoding: quoted-printable
Content-Description: Anhang
Ein Anhang mit Text.
Weil das wohl auch in der urspr=FCnglichen Mail so war
und nicht ein wenig mehr Text, damit es nicht so langweilig ist...
--=-=-=
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
und hier geht der Text weiter...
sch=F6n mit Umlaut, wie besprochen!
Und das ganz nat=FCrlich signiert...
und? hilft's?
sascha
=2D-=20
Sascha Wilde OpenPGP key: 4BB86568
Intevation GmbH, Osnabr=FCck http://www.intevation.de/~wilde/
Amtsgericht Osnabr=FCck, HR B 18998 http://www.intevation.de/
Gesch=E4ftsf=FChrer: Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner
--=-=-=--
--==-=-=
Content-Type: application/pgp-signature
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFF+VUtuyGFFEu4ZWgRApmZAKCGHUi440uPEggdKZoE1WHWO0ah6QCfaqLv
HYelJfvqQQJkoW99SKRUVec=
=AmlK
-----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, ", ")))
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()
More information about the commits
mailing list