title: using a TIdSMTP component to send mails to a server with TLS/SSL configuration
body: <p>I need to send mails using Delphi7 and the Indy10 component TIdSMTP; the mail must sent to the server of the Italian tax office.</p>
  
  <p>I used a simple MAPI component to send emails, but now it is necessary to use the Indy components, but I don't know them.</p>
  
  <p>I try to create a program as this:</p>
  
  <pre><code>procedure TForm1.BtCreateClick(Sender: TObject);
  var
    DATA : TIdMessage;
    SMTP : TIdSMTP;
    SSL : TIdSSLIOHandlerSocketOpenSSL;
  begin
    try
      SMTP := TIdSMTP.Create(nil);
      DATA := TIdMessage.Create(nil);
      SSL := TIdSSLIOHandlerSocketOpenSSL.Create(nil);
      SSL.SSLOptions.Method := sslvTLSv1;
      SSL.SSLOptions.Mode := sslmClient;     // or sslmUnassigned ?
      SSL.SSLOptions.VerifyMode := [];
      SSL.SSLOptions.VerifyDepth := 0;
      DATA.From.Address := eUser.Text;       // 'my.name@pec.it'
      DATA.Recipients.EMailAddresses := eDest.Text; // 'recipient@pec.it'
      DATA.Subject := eOggetto.Text;         // 'dispatch of test'
      DATA.Body.Text := eCorpo.Lines.Text;   // ' Isend a mail from "pec" client to "ord" server)
      if (eAlleg.Text &lt;&gt; '') and FileExists(eAlleg.Text) then
         TIdAttachmentFile.Create(DATA.MessageParts, eAlleg.Text); 
      SMTP.IOHandler := SSL;
      SMTP.UseTLS := utUseExplicitTLS;
      SMTP.Host := eHost.Text;               // 'imaps.pec.aruba.it';
      SMTP.Port := StrToInt(ePorta.Text);    // 993 ;
      SMTP.Username := eUser.Text;           // 'my.name@pec.it'
      SMTP.Password := ePassw.Text;          // 'my_password_123'
      // SMTP.SASLMechanisms;                // no
      try
        try
          SMTP.Connect;
          SMTP.Send(DATA);
        except
          on E:Exception do
             ShowMessage('Non posso spedire E-Mail: ' + E.Message);
        end;
      finally
        if SMTP.Connected then SMTP.Disconnect;
      end;
    except
      on E : Exception do
      ShowMessage('Errore durante la spedizione del file: ' + E.Message);
    end;
  end;
  </code></pre>
  
  <p>I've inserted the "libeay32.dll" and the "ssleay32.dll" in the \Windows\System32 directory (rel: openssl 1.0.2q).</p>
  
  <p>After the click, it seems the mail is sent, the circle appear (screen.Hourglass) but any following action (loop?). No error message.</p>
  
  <p>I believe this is a problem of handshake, some property not communicated by the client. The TIdSSLIOHandlerSocketOpenSSL'setup is incomplete?</p>
  
  <p>I admit that the Indy documentation is too difficult and time-consuming for me, I've not got the correct knowledge to understand the use of the various properties.</p>
  
  <p>Is someone able to point out to me why the program doesn't work?</p>