Commit 036a6c6d authored by Sebastien Robin's avatar Sebastien Robin

first submission


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@356 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 084adda5
## 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