summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pykolab/xml/event.py6
-rw-r--r--wallace/module_invitationpolicy.py2
-rw-r--r--wallace/module_resources.py2
3 files changed, 6 insertions, 4 deletions
diff --git a/pykolab/xml/event.py b/pykolab/xml/event.py
index 72cbfeb..ca23694 100644
--- a/pykolab/xml/event.py
+++ b/pykolab/xml/event.py
@@ -910,7 +910,7 @@ class Event(object):
name_map = dict([(v, k) for (k, v) in map.iteritems()])
return name_map[val] if name_map.has_key(val) else 'UNKNOWN'
- def to_message(self):
+ def to_message(self, creator=None):
from email.MIMEMultipart import MIMEMultipart
from email.MIMEBase import MIMEBase
from email.MIMEText import MIMEText
@@ -922,7 +922,9 @@ class Event(object):
email = organizer.email()
name = organizer.name()
- if not name:
+ if creator:
+ msg['From'] = creator
+ elif not name:
msg['From'] = email
else:
msg['From'] = '"%s" <%s>' % (name, email)
diff --git a/wallace/module_invitationpolicy.py b/wallace/module_invitationpolicy.py
index 4796aed..92e1fea 100644
--- a/wallace/module_invitationpolicy.py
+++ b/wallace/module_invitationpolicy.py
@@ -821,7 +821,7 @@ def store_event(event, user_rec, targetfolder=None):
imap.folder_utf7(targetfolder),
None,
None,
- event.to_message().as_string()
+ event.to_message(creator="Kolab Server <wallace@localhost>").as_string()
)
return result
diff --git a/wallace/module_resources.py b/wallace/module_resources.py
index 47259da..d65120c 100644
--- a/wallace/module_resources.py
+++ b/wallace/module_resources.py
@@ -686,7 +686,7 @@ def save_resource_event(itip_event, resource, replace=False):
targetfolder,
None,
None,
- itip_event['xml'].to_message().as_string()
+ itip_event['xml'].to_message(creator="Kolab Server <wallace@localhost>").as_string()
)
return result