Plone 3.3.5 - sending emails 'len() of unsized object' error = NO ESMTP PASSWORD

classic Classic list List threaded Threaded
2 messages Options
Rob Hills Rob Hills
Reply | Threaded
Open this post in threaded view
|

Plone 3.3.5 - sending emails 'len() of unsized object' error = NO ESMTP PASSWORD

This one fortunately didn't take as much time to sort out as it might have but it looks like something that could easily cause lots of angst so I'll post my experience in case it saves someone else some time in the future.

The following error occurred when trying to send email in a script:
2010-08-12 17:37:48 ERROR Zope.SiteErrorLog 1281605868.480.549034262868 http://localhost:8080/MySite/order
Traceback (innermost last):
  Module ZPublisher.Publish, line 119, in publish
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 42, in call_object
  Module Products.CMFFormController.FSControllerPageTemplate, line 90, in __call__
  Module Products.CMFFormController.BaseControllerPageTemplate, line 28, in _call
  Module Products.CMFFormController.ControllerBase, line 231, in getNext
  Module Products.CMFFormController.Actions.TraverseTo, line 38, in __call__
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 42, in call_object
  Module Products.CMFFormController.FSControllerPythonScript, line 104, in __call__
  Module Products.CMFFormController.Script, line 145, in __call__
  Module Products.CMFCore.FSPythonScript, line 140, in __call__
  Module Shared.DC.Scripts.Bindings, line 313, in __call__
  Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec
  Module Products.CMFCore.FSPythonScript, line 196, in _exec
  Module None, line 102, in order_email
   - <FSControllerPythonScript at /MySite/order_email>
   - Line 102
  Module Products.SecureMailHost.SecureMailHost, line 246, in secureSend
  Module Products.SecureMailHost.SecureMailHost, line 276, in _send
  Module Products.SecureMailHost.mail, line 126, in send
  Module smtplib, line 576, in login
  Module smtplib, line 536, in encode_cram_md5
  Module hmac, line 50, in __init__
TypeError: len() of unsized object

The cause of the error was having an empty 'esmtp password' in my Plone mail settings, but I reckon you'd be hard pressed to guess that from the error message and traceback.  I had an empty esmtp password because I'd changed my site Mail settings and forgotten the "Site from address".  When I corrected that, I overlooked having to re-type my password (it was still showing circles in the password field).

Cheers,
Rob Hills
Mikko Ohtamaa Mikko Ohtamaa
Reply | Threaded
Open this post in threaded view
|

Re: Plone 3.3.5 - sending emails 'len() of unsized object' error = NO ESMTP PASSWORD

Rob Hills wrote
This one fortunately didn't take as much time to sort out as it might have but it looks like something that could easily cause lots of angst so I'll post my experience in case it saves someone else some time in the future.
Hi Rob,

I wrote down this in collective documentation:

https://svn.plone.org/svn/collective/collective.developermanual/trunk/source/troubleshooting/exceptions.txt

so that if someone else experiences the same problem in the future he or she has better chance to solve it.

Cheers,
Mikko