Archived Forum Post

Index of archived forum posts

Question:

SMTP SSL Error

Feb 05 '14 at 10:21

Hi!

I got this error by open a connection to a t-online.de SSL SMTP server:

Now i like to send an email via SSL, but this doesn't work:

ChilkatLog:
  SendEmail:
    DllDate: Aug 15 2013
    ChilkatVersion: 9.4.1.42
    UnlockPrefix: XXXXXXXXXXXXX
    Username: FRITZ-PC:XXXXXXXXXXXXXX
    Architecture: Little Endian; 32-bit
    Language: ActiveX
    VerboseLogging: 0
    recipients:
      TO: XXXXXXXXX@gmail.com
      totalCount: 1
    --recipients
    renderToMime:
      createEmailForSending:
        xSigningAlg: sha1
        Auto-generating Message-ID
      --createEmailForSending
      renderToMime: Elapsed time: 0 millisec
    --renderToMime
    progressTotal: 4135
    SmtpConnect:
      SmtpHost: securesmtp.t-online.de
      SmtpPort: 587
      SmtpUsername: XXXXXXXXXXXXXXXXXXXX@t-online.de
      SmtpSsl: 1
      StartTLS: 0
      Need new SMTP connection
      checkForExistingConnection: Elapsed time: 0 millisec
      SMTP_Connect:
        Connecting to SMTP server securesmtp.t-online.de:587
        smtp_host: securesmtp.t-online.de
        smtp_port: 587
        smtp_user: XXXXXXXXXXXXXXXX@t-online.de
        ConnectTimeoutMs_1: 30000
        calling ConnectSocket2
        IPV6 enabled connect with NO heartbeat.
        connectingTo: securesmtp.t-online.de
        resolveHostname1:
          Resolving domain name (IPV4) via gethostbyname
        --resolveHostname1
        GetHostByNameHB_ipv4: Elapsed time: 0 millisec
        myIP_1: 192.168.1.20
        myPort_1: 58317
        connect successful (1)
        clientHelloMajorMinorVersion: 3.1
        buildClientHello:
          majorVersion: 3
          minorVersion: 1
          numRandomBytes: 32
          sessionIdSize: 0
          numCipherSuites: 10
          numCompressionMethods: 1
        --buildClientHello
        readIncomingTls_serverHello:
          readTlsRecord:
            Timeout waiting to read socket or accept connection
            timeoutMs: 30000
            Failed to read TLS record (2)
            tlsRec_msg: 162
            msgLen: 8294
          --readTlsRecord
        --readIncomingTls_serverHello
        Expected ServerHello but did not receive it.
        Client handshake failed. (3)
        Failed to connect to SMTP server.
      --SMTP_Connect
      smtpConnect: Socket timeout.
      checkOrMakeSmtpConnection: Elapsed time: 30296 millisec
    --SmtpConnect
    Failed.
  --SendEmail
--ChilkatLog

Answer

See this: https://www.fastmail.fm/help/technology_ssl_vs_tls_starttls.html

Port 587 is traditionally a port for explicit SSL/TLS, not implicit SSL/TLS. Therefore, you should set the StartTLS property = 1 (which is for explicit SSL/TLS), but leave the SmtpSsl property at the default value of 0.