Re: [Zope] MailHost and 2.6.0
Module Products.MailHost.MailHost, line 125, in send TypeError: _send() takes exactly 3 arguments (4 given)
Can anyone shed some light on this?
Not really, no. _send() in 2.6.0 takes exactly 4 arguments, so how you can get an error claiming _send() takes exactly 3 arguments is totally beyond me.
Looking at line 125 of MailHost.py you get this... self._send(mfrom, mto, messageText)
Whereas on the 2.5.1 version you get this (after much header manipulations), self._send( headers, messageText )
Yes, this is correct. The interface of _send() has changed. Since this is only used by MailHost itself, it doesn't affect how you use MailHost. send() hasn't changed, so the public interfaces are exactly the same. Best Regards Lennart Regebro Torped Strategi och Kommunikation AB (ps I'm not on the zope@zope.org mailinglist, so if anybody is going to reply, please cc me).
Yes, this is correct. The interface of _send() has changed. Since this is only used by MailHost itself, it doesn't affect how you use MailHost. send() hasn't changed, so the public interfaces are exactly the same.
well, it does affect you if you override _send in a new product that has a different delivery mechanism... this API change tripped me up. jens
From: "Jens Vagelpohl" <jens@zope.com>
well, it does affect you if you override _send in a new product that has a different delivery mechanism... this API change tripped me up.
Hmm. That's true. I wasn't aware anyone did that. What would that different delivery mechanism be? All of MailHost is designed for SMTP, so why would you use anything else?
an asynchronous delivery mechanism. see here for details: http://www.dataflake.org/software/maildrophost/ jens On Sunday, Oct 27, 2002, at 13:09 US/Eastern, Lennart Regebro wrote:
From: "Jens Vagelpohl" <jens@zope.com>
well, it does affect you if you override _send in a new product that has a different delivery mechanism... this API change tripped me up.
Hmm. That's true. I wasn't aware anyone did that. What would that different delivery mechanism be? All of MailHost is designed for SMTP, so why would you use anything else?
From: "Jens Vagelpohl" <jens@zope.com>
an asynchronous delivery mechanism. see here for details:
Ah, OK. But it doesn't cause any actual problems, right? Because the new _send() methods make more sense from an SMTP point of view. There's not point in passing all the headers, when only "To" and "From" is used.
neither caused problems. it was just an unexpected change that i was not aware about at first until i got error reports from people... jens On Sunday, Oct 27, 2002, at 19:25 US/Eastern, Lennart Regebro wrote:
From: "Jens Vagelpohl" <jens@zope.com>
an asynchronous delivery mechanism. see here for details:
Ah, OK. But it doesn't cause any actual problems, right? Because the new _send() methods make more sense from an SMTP point of view. There's not point in passing all the headers, when only "To" and "From" is used.
participants (3)
-
Jens Vagelpohl -
Lennart Regebro -
Lennart Regebro