cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: SMTP usage

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sat, 13 Feb 2010 13:49:30 +0100 (CET)

On Fri, 12 Feb 2010, Colin Hogben wrote:

> Also, the addresses following MAIL FROM: and RCPT TO: should be surrounded
> by angle brackets according to RFC 2821 (though I believe most servers in
> the wild will accept without). E.g.
>
> RCPT TO:<daniel_at_haxx.se>

Right, the RFC says:

    RCPT TO:<forward-path> [ SP <rcpt-parameters> ] <CRLF>

    The first or only argument to this command includes a forward-path
    (normally a mailbox and domain, always surrounded by "<" and ">"
    brackets) identifying one recipient.

.. so it's really a matter of us wanting to allow the app to set
"rcpt-parameters" or not. I'm not that into SMTP to know if that second part
is acctually used or not in reality.

As I see it we have three options on how to do this:

A) like now, which allows maximum flexibility and libcurl sends the raw data
    the app provides. Angle brackets or not. The downside will be that this may
    lead to apps not doing this right and thus not quite spec compliant.

B) always wrap the given data within angle brackets. Will decrease the
    flexibility for the app. But does it matter?

C) like now, but we check the first letter to see if it is an angle bracket
    and if it isn't, we assume that libcurl should wrap the given data within
    a set. Downsides or the golden combo?

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2010-02-13