GSoC: finagle-smtp - initial

This is initial version of SMTP client for Finagle, which I am working on during GSoC'14.
For now it supports sending independent commands to SMTP server and sending a simple text email to one ore more addresses (without cc, bcc and reply-to). Usage is described in `README.md`. 
Oh, sorry, I thought you were asking to check the behavior it has right
now, not with sending QUIT in the dispatcher. I'll check the latter, but I
can say that the server doesn't receive the request in that case, because
in its logs the connection is torn down by client and QUIT isn't received.


2014-08-11 18:45 GMT+04:00 Moses Nakamura <notifications@github.com>:

> In finagle-smtp/src/main/scala/com/twitter/finagle/Smtp.scala:
>
> > +   * Constructs an SMTP client.
> > +   *
> > +   * Upon closing the connection this client sends QUIT command;
> > +   * it also performs dot stuffing.
> > +   */
> > +  override def newClient(dest: Name, label: String): ServiceFactory[Request, Reply] = {
> > +
> > +    val quitOnCloseClient = {
> > +      new ServiceFactoryProxy[Request, Reply](defaultClient.newClient(dest, label)) {
> > +        override def apply(conn: ClientConnection): Future[ServiceProxy[Request, Reply]] = {
> > +          self.apply(conn) map { service =>
> > +            val quitOnClose = new ServiceProxy[Request, Reply](service) {
> > +              override def close(deadline: Time): Future[Unit] = {
> > +                if (service.isAvailable)
> > +                  service(Request.Quit)
> > +                service.close(deadline)
>
> Wait, I thought you were saying that it wasn't behaving properly in the
> dispatcher? I think I got confused as to what was going on . . . I was
> trying to reply to a message you posted that said,
>
> Yes, when testing with SMTP server stub and looking at its logs, I found
> out that this request is not actually sent from dispatcher, so I sought the
> way to enforce service(Request.Quit) before service.close(deadline)
>
> but I couldn't find the actual message (github swallowed it maybe) so I
> just put it here.
>
> Is the behavior correct now then?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/twitter/finagle/pull/287/files#r16056704>.
>



-- 
*С уважением,*
*Валерия Дымбицкая*