thomas: utils/testing test-send-group-invitation-issue2745.py, NONE, 1.1

cvs at kolab.org cvs at kolab.org
Fri Jul 11 17:24:08 CEST 2008


Author: thomas

Update of /kolabrepository/utils/testing
In directory doto:/tmp/cvs-serv31355

Added Files:
	test-send-group-invitation-issue2745.py 
Log Message:
Added sample email to trigger kolab/issue2745 (php error after sending an update to an event)


--- NEW FILE: test-send-group-invitation-issue2745.py ---
#!/usr/bin/env python
"""Send email with iTIP invitation trying to trigger kolab/issue2745

(php error after sending an update to an event)

Usage $progname <recipientemailaddress>

This script is Free Software under the GNU General Public License >=v2.
bernhard at intevation.de (initial 20080505)
thomas at intevation.de (update 20080711)
"""

__version__="$Revision: 1.1 $"
# $Source: /kolabrepository/utils/testing/test-send-group-invitation-issue2745.py,v $

import sys

import datetime
import itertools
import smtplib
import string

msg = """To: %s
From: %s
Subject: kolab/issue2745
Date: Fri, 11 Jul 2008 14:54:43 +0200
MIME-Version: 1.0
Content-Type: text/calendar;
  method=request;
  charset="utf-8"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

BEGIN:VCALENDAR
PRODID:-//Microsoft Corporation//Outlook 11.0 MIMEDIR//EN
VERSION:2.0
METHOD:REQUEST
BEGIN:VTIMEZONE
TZID:Amsterdam, Berlin, Bern, Rom, Stockholm, Wien
BEGIN:STANDARD
DTSTART:20071028T030000
RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=10
TZOFFSETFROM:+0200
TZOFFSETTO:+0100
TZNAME:Standard Time
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:20080330T020000
RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=3
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
TZNAME:Daylight Savings Time
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
ATTENDEE;ROLE=REQ-PARTICIPANT;RSVP=TRUE:MAILTO:thomas at intevation.de
ATTENDEE;ROLE=REQ-PARTICIPANT;RSVP=TRUE:MAILTO:gruppe_test at test.hq
ORGANIZER:MAILTO:ltest3 at test.hq
DTSTART;TZID="Amsterdam, Berlin, Bern, Rom, Stockholm, Wien":20080711T203000
DTEND;TZID="Amsterdam, Berlin, Bern, Rom, Stockholm, Wien":20080711T210000
RRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=FR;WKST=MO
TRANSP:OPAQUE
SEQUENCE:0
UID:040000008200E00074C5B7101A82E0080000000040D86B0D66E3C8010000000000000000100
 000001666279B4EAAF846A184ADC1F0C760BA
DTSTAMP:20080711T125443Z
DESCRIPTION:Zeit: Dieser Termin steht jede Woche am Freitag an\, beginnend
  am 11.07.2008 von 20:30 bis 21:00 (GMT+01:00) Amsterdam\, Berlin\, Bern\,
  Rom\, Stockholm\, Wien.\n\n*~*~*~*~*~*~*~*~*~*\n\n\n
SUMMARY:kolab/issue2745
PRIORITY:5
X-MICROSOFT-CDO-IMPORTANCE:1
CLASS:PUBLIC
BEGIN:VALARM
TRIGGER:-PT15M
ACTION:DISPLAY
DESCRIPTION:Reminder
END:VALARM
END:VEVENT
END:VCALENDAR
"""

toaddr = [sys.argv[1]]
smtpserver='localhost'
# if you set a loginname, a connection via TLS and authentification is tried
loginname = None
password  = None

fromaddr="nobody at example.org"

server=smtplib.SMTP(smtpserver)
#server.set_debuglevel(1)

if loginname != None and password != None:
    server.starttls()
    server.login(loginname,password)

server.sendmail(fromaddr, toaddr, msg % (fromaddr, string.join(toaddr, ", ")))

server.quit()





More information about the commits mailing list