Search code examples
c#socketsnetwork-programmingc#-3.0gmail

Does Gmail support for RFC 821?


Does Gmail support RFC 821? I know it is using ESMTP. Based on understanding ESMTP is RFC 1869. But I must use RFC 821 commands with C# and want to test it. If Gmail doesn't provide support, is there any server provides this service for developers?

Thanks in advance


Solution

  • RFC1869 defines a set of extensions to the SMTP protocol that a server can support. They come in addition to the standard SMTP protocol described in RFC 821. In other words, any server that supports RFC 1869 must also support RFC 821. The newer standard makes this explicit:

    4.1. Changes to STD 10, RFC 821

    This specification is intended to extend STD 10, RFC 821 without impacting existing services in any way. The minor changes needed are enumerated below.

    If a client connects to such a server and issues a standard HELO command, it should get a server that speaks SMTP. If you need to use any of the SMTP extensions, though, you need to instead issue the extension command EHLO, which indicates a client that also speaks RFC1869.

    However, just because the server speaks SMTP doesn't mean it's going to speak it with you. In particular, the server may require authentication as per RFC 4954 (e.g. require an AUTH LOGIN or similar command, or a STARTTLS command for encrypted communication). If you fail to properly authenticate before issuing a command, the server could legally send an SMTP error. While this error would be a legal SMTP response per RFC 821, that's probably not going to help you out very much.