[Grok-dev] send mail queryUtility ComponentLookupError todoplus
DIVINE, PAUL (PAUL)
paul.divine at alcatel-lucent.com
Tue Aug 24 10:33:53 EDT 2010
Hi Maurits van Rees,
Thanks a lot. The program doesn't stop anymore.
Now I have SMTPRecipientsRefused.
2010-08-24 09:33:24,005 ERROR [QueueProcessorThread] Error while sending mail from paul.divine at alcatel-lucent.com to paul.divine at alcatel-lucen
t.com.
Traceback (most recent call last):
File "/root/.buildout/eggs/zope.sendmail-3.7.1-py2.5.egg/zope/sendmail/queue.py", line 261, in run
self.mailer.send(fromaddr, toaddrs, message)
File "/root/.buildout/eggs/zope.sendmail-3.7.1-py2.5.egg/zope/sendmail/mailer.py", line 72, in send
connection.sendmail(fromaddr, toaddrs, message)
File "/usr/lib/python2.5/smtplib.py", line 703, in sendmail
raise SMTPRecipientsRefused(senderrs)
SMTPRecipientsRefused: {'paul.divine at alcatel-lucent.com': (550, '5.7.1 <paul.divine at alcatel-lucent.com>... Relaying denied. IP name lookup fai
led [xxx.xx.xx.xxx]')}
I suppose it is a configuration problem.
Best regards.
Paul
-----Message d'origine-----
De : grok-dev-bounces+paul.divine=alcatel-lucent.com at zope.org [mailto:grok-dev-bounces+paul.divine=alcatel-lucent.com at zope.org] De la part de Maurits van Rees
Envoyé : lundi 23 août 2010 09:30
À : grok-dev at zope.org
Objet : Re: [Grok-dev] send mail queryUtility ComponentLookupError todoplus
Op 23-08-10 09:02, DIVINE, PAUL (PAUL) schreef:
> Hi Maurits van Rees,
> Thanks for your help.
> I have modified the configure.zcml two lines
> name="todoplus"
> mailer="todoplus"
> And I restarted the server.
> Then the same error is displayed.
>
> Paul Diviné
> The details are given in the following lines.
>
> << msg["To"] = ','.join(recipient)
> msg["Subject"] = email.Header.Header(subject, 'UTF-8')
> mailer = getUtility(IMailDelivery, 'todoplus')
> mailer.send(sender, recipient, msg.as_string())>> mailer = getUtility(IMailDelivery, 'todoplus')
> Module zope.component._api:171 in getUtility
> << if utility is not None:
> return utility
> raise ComponentLookupError(interface, name)
>
> def queryUtility(interface, name='', default=None, context=None):>> raise ComponentLookupError(interface, name)
> ComponentLookupError: (<InterfaceClass zope.sendmail.interfaces.IMailDelivery>, 'todoplus')
You have this in your zcml:
<mail:queuedDelivery
name="mailer"
...>
That suggests to me that you may need to write this instead:
mailer = getUtility(IMailDelivery, 'mailer')
--
Maurits van Rees
Programmer, Zest Software
_______________________________________________
Grok-dev mailing list
Grok-dev at zope.org
https://mail.zope.org/mailman/listinfo/grok-dev
More information about the Grok-dev
mailing list