Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8700153
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T02:07:16+00:00 2026-06-13T02:07:16+00:00

I am writting my own SMTP client in c# (to be used in compact

  • 0

I am writting my own SMTP client in c# (to be used in compact framework). trying to use smtp.gmail.com server

After succesful STARTTLS command if smtp client sends EHLO Command response from server isempty`.

message = "EHLO 10.192.4.223\r\n";
      Write(message);
      response = Response();
      if (response.Substring(0, 3) != "250")
      {
        throw new SmtpException(response);
      }
      message = "STARTTLS\r\n";
      Write(message);
      response = Response();
      if (response.Substring(0, 3) != "220")
      {
        throw new SmtpException(response);
      }

      message = "EHLO 10.192.4.223\r\n";
      Write(message);
      response = Response();
      if (response.Substring(0, 3) != "250") //empty response
      {
        throw new SmtpException(response);
      }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T02:07:17+00:00Added an answer on June 13, 2026 at 2:07 am

    Because after STARTTLS you are no longer supposed to send plain text commands. Instead, you are supposed to switch to TLS-secured communication on the same existing TCP socket/connection.

    See what RFC 2487 – SMTP Service Extension for Secure SMTP over TLS says:

    After receiving a 220 response to a STARTTLS command, the client
    SHOULD start the TLS negotiation before giving any other SMTP
    commands.

    and

    5.2 Result of the STARTTLS Command

    Upon completion of the TLS handshake, the SMTP protocol is reset to
    the initial state (the state in SMTP after a server issues a 220
    service ready greeting). The server MUST discard any knowledge
    obtained from the client, such as the argument to the EHLO command,
    which was not obtained from the TLS negotiation itself. The client
    MUST discard any knowledge obtained from the server, such as the list
    of SMTP service extensions, which was not obtained from the TLS
    negotiation itself. The client SHOULD send an EHLO command as the
    first command after a successful TLS negotiation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Preliminary: I am writting my own httpclient in Java. I am trying to parse
I am writting my own small framework and I am going to implement friendly
I am writing my own implementation of the Google Drive client for the Android
I'm writting an iPhone client that downloads stuff from the net. Since the cellular
I'm writting my own rich text editor in javascript formatBlock requires a tag-name string.
I'm writing my own minifying tool for practice (regular expresssions practice), but after a
I am writing my own poor-man's testing framework. In my console application, I have
I'm writting my own view engine. public class MyViewEngine : RazorViewEngine { public override
It's my first time writting there but after reading and searching a lot about
I'm writing my own component in Delphi XE2 but I primary use C++ Builder.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.