Back to index

moin  1.9.0~rc2
Functions | Variables
MoinMoin.xmlrpc.ProcessMail Namespace Reference

Functions

def execute

Variables

tuple logging = log.getLogger(__name__)

Function Documentation

def MoinMoin.xmlrpc.ProcessMail.execute (   xmlrpcobj,
  secret,
  mail 
)

Definition at line 14 of file ProcessMail.py.

00014 
00015 def execute(xmlrpcobj, secret, mail):
00016     request = xmlrpcobj.request
00017     secret = xmlrpcobj._instr(secret)
00018     mail = str(mail)
00019 
00020     if request.cfg.secrets['xmlrpc/ProcessMail'] != secret:
00021         return u"Invalid password"
00022 
00023     try:
00024         mailimport.import_mail_from_string(request, mail)
00025     except mailimport.ProcessingError, e:
00026         err = u"An error occured while processing the message: " + str(e.args)
00027         logging.error(err)
00028         return xmlrpcobj._outstr(err)
00029     return xmlrpcobj._outstr(u"OK")

Variable Documentation

Definition at line 10 of file ProcessMail.py.