[Grok-dev] sending emails by grok

Sebastian Ware sebastian at urbantalk.se
Wed Jul 15 08:41:48 EDT 2009


Is it correct that all I need to send emails using zope.sendmail  
through a local SMTP-server is to define two global utilities like this:

from zope.sendmail.interfaces import IMailDelivery, ISMTPMailer

from zope.sendmail.delivery import QueuedMailDelivery
class MyMailer(grok.GlobalUtility, QueuedMailDelivery):
     grok.implements(IMailDelivery)
     grok.name('my-app.mailer')

     def __init__(self):
         QueuedMailDelivery.__init__(queuePath='var/mailqueue')

from zope.sendmail.mailer import SMTPMailer
class MyMailer(grok.GlobalUtility, SMTPMailer):
     grok.implements(ISMTPMailer)
     grok.name('my-app.smtp')

Mvh Sebastian

15 jul 2009 kl. 13.34 skrev Souheil CHELFOUH:

> zope.sendmail is a very good choice.
> It's very effective, fast and reliable, from my experience.
>
> 2009/7/14 Jens Adner <j.adner at fh-sm.de>
> Hello,
>
> I would like to use a view in grok to allow our user to create a  
> support
>  request.
>
> After submitting the form I would like generate an email.
>
> I read about zope.sendmail. Is this the latest package I should use to
> send an email or are there other choices (maybe better)?
>
> Greetings
> Jens
> --
> ++++++++ Jens Adner IuK-Zentrum Fachhochschule Schmalkalden +++++++++
> ++++++++ Fon: +49 3683688 9201  Fax: +49 3683688 989201     +++++++++
> _______________________________________________
> Grok-dev mailing list
> Grok-dev at zope.org
> http://mail.zope.org/mailman/listinfo/grok-dev
>
> _______________________________________________
> Grok-dev mailing list
> Grok-dev at zope.org
> http://mail.zope.org/mailman/listinfo/grok-dev



More information about the Grok-dev mailing list