Commit f4a94d3d authored by Sebastien Robin's avatar Sebastien Robin

moved to ERP5SyncML


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@508 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ca485e54
## Script (Python) "mail_received"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=theMail
##title=
##
import string
mail_message = None
if theMail['headers'].get('to').find('server') >= 0:
id = theMail['headers'].get('subject')
msg = theMail['body']
context.portal_synchronizations.PubSync(id,msg=msg)
elif theMail['headers'].get('to').find('client') >= 0:
id = theMail['headers'].get('subject')
msg = theMail['body']
context.portal_synchronizations.SubSync(id,msg=msg)
# the return of None indicates a success
# The return of anything else assumes that you are returning an error message
# and most MTA's will bounce that error message back to the mail sender
return None
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment