Archived Forum Post

Index of archived forum posts


Must issue a STARTTLS is ignored

Aug 15 '15 at 18:35

When attempting to OpenSmtpConnection in Chilkat Version The settings are not configured correctly. A common mistake for users. We have implemented a Test button to verify the settings are correct. Unfortunately if SSL and TLS options have not been set this log is what happens.

Is there a setting to prevent this error from being ignored?

        <info>This SMTP server did not list authentication methods.</info>
        <info>Defaulting to LOGIN authentication method.</info>
              <SmtpCmdSent><![CDATA[AUTH LOGIN<CRLF>]]></SmtpCmdSent>
              <SmtpCmdResp>530 5.7.0 Must issue a STARTTLS command first. y145sm7205134ywd.0 - gsmtp</SmtpCmdResp>
          <error>AUTH LOGIN failed</error>
        <info>Ignoring the error, assuming no authentication is necessary.</info>
      <ConnectionType>Unencrypted TCP/IP</ConnectionType>

Accepted Answer

In, the VerifySmtpLogin method returns a success. I know it should fail for one of two reasons.

  1. StartTLS is required by the server.
  2. The username and password are invalid.

I decided to look at the OpenSmtpConnection and SmtpAuthenticate methods to see what type of detail I was getting from the LastErrorXml. The results are very different from VerifySmtpLogin.

I have received a preview of, and the VerifySmtpLogin is returning a failure code.


Instead of rolling your own test methods, do the VerifySmtpConnection and VerifySmtpLogin methods accomplish what you need?