I need add more information. Can error may be caused if my function don't have one condition: def send_application(msg,entrant_XML): #Letter for operator try: oper = mail.send('opera...@domen.ru','Theme','Letter text...',attachments = files) except Exception: oper = False
#Letter for entrant try: abit = mail.send(session.abit_email,'Theme','Letter text...') except Exception: abit = False if ((oper==True) & (abit==True)): return ('My message',True) elif ((oper==True) & (abit==False)): return ('My message',False) elif ((oper==False) & (abit==True)): return ('My message',False) Here I don't have that: else ((False) & (False)): return ('My message',False) Now I get return ('My message',True) in 25 percent of the time. How can I improve that result? Maybe I need take several attemts, but without sending two the same letter on one email. We have own mail server. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/7c083f22-d1f5-45c5-8f8d-94629eceecca%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.