I get an error sending out mail from within a Plone app:- This site encountered an error trying to fulfill your request. The errors were: Error Type Mail couldn`t be sent (Script send_a_mail.py) This is the relevant script:- #Try if a Mailhost is specified try: mailhost=getattr(context, context.portal_url.superValues('Mail Host')[0].id) except: raise "There is no Mailhost specified (Script send_a_mail.py)" #send try: mailhost.send(mMsg,mTo,mFrom,mSubj) except: raise "Mail couldn`t be sent (Script send_a_mail.py)" How do I tell what the problem is? Should I expect to see anything in the local sendmail log? -- John
John Poltorak wrote:
I get an error sending out mail from within a Plone app:-
This site encountered an error trying to fulfill your request. The errors were:
Error Type Mail couldn`t be sent (Script send_a_mail.py)
This is the relevant script:-
#Try if a Mailhost is specified try: mailhost=getattr(context, context.portal_url.superValues('Mail Host')[0].id) except: raise "There is no Mailhost specified (Script send_a_mail.py)"
#send try: mailhost.send(mMsg,mTo,mFrom,mSubj) except: raise "Mail couldn`t be sent (Script send_a_mail.py)"
How do I tell what the problem is?
Try adding an exception variable to the final except statement and then log it (or raise the message). Perhaps it will provide better information.
Should I expect to see anything in the local sendmail log?
Possibly, though not likely. Depends on the problem. --jcc
On Mon, Nov 29, 2004, John Poltorak wrote:
I get an error sending out mail from within a Plone app:-
This site encountered an error trying to fulfill your request. The errors were:
Error Type Mail couldn`t be sent (Script send_a_mail.py)
This is the relevant script:-
...
How do I tell what the problem is?
Scripts that send mail have to be set to proxy as Manager. Click on the script in the ZMI, click on Proxy, and set Manager. Bill -- INTERNET: bill@Celestial.COM Bill Campbell; Celestial Software LLC UUCP: camco!bill PO Box 820; 6641 E. Mercer Way FAX: (206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676 URL: http://www.celestial.com/ Breathe fire, slay dragons, and take chances. Failure is temporary, regret is eternal.
On Mon, Nov 29, 2004 at 11:57:35AM -0800, Bill Campbell wrote:
On Mon, Nov 29, 2004, John Poltorak wrote:
I get an error sending out mail from within a Plone app:-
This site encountered an error trying to fulfill your request. The errors were:
Error Type Mail couldn`t be sent (Script send_a_mail.py)
This is the relevant script:-
...
How do I tell what the problem is?
Scripts that send mail have to be set to proxy as Manager.
Click on the script in the ZMI, click on Proxy, and set Manager.
It is already set like that. Where should I expect to find any documentation on mailhost.send ?
Bill -- INTERNET: bill@Celestial.COM Bill Campbell; Celestial Software LLC UUCP: camco!bill PO Box 820; 6641 E. Mercer Way FAX: (206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676 URL: http://www.celestial.com/
Breathe fire, slay dragons, and take chances. Failure is temporary, regret is eternal.
-- John
participants (3)
-
Bill Campbell -
J Cameron Cooper -
John Poltorak