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

  • SEARCH
  • Home
  • 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 8182743
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T00:57:12+00:00 2026-06-07T00:57:12+00:00

I am trying to send emails from smtps (secure smtp) using Indy and the

  • 0

I am trying to send emails from smtps (secure smtp) using Indy and the technique exaplined in this Marco Cantù article.

This is what I am using:

object SMTP: TIdSMTP
  IOHandler = IdSSLIOHandlerSocketOpenSSL1
  SASLMechanisms = <>
  UseTLS = utUseExplicitTLS
  Left = 32
  Top = 196
end

and

SMTP.Host := 'smtps.pec.aruba.it';;
        SMTP.Port := 465;;
        SMTP.Username := 'myaddress@pec.it';
        SMTP.Password := 'myPassw0rd'; 
        MailMessage.Encoding := meDefault;
        MailMessage.From.Address := 'myaddress@pec.it';

        MailMessage.BccList.EMailAddresses := 'testaddress0@gmail.com';
        MailMessage.Subject := 'Test Mail';
        MailMessage.Body.Text := 'Please ignore this mail, This is a test';

        SMTP.Connect; //failure!!!
        SMTP.Send(MailMessage);

i program hangs on SMTP.Connect, but without any exception or useful error.

If instead than aboe i use gmail setings as explained in the article all works

Can you please give an advice?

i have Indy 10.5.8 and the ssl dlls in the same path as the exe.

  • 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-07T00:57:14+00:00Added an answer on June 7, 2026 at 12:57 am

    Connect() hangs because you are connecting to the wrong Port with the wrong UseTLS property assignment.

    Port 465 is the implicit SSL port for SMTP, meaning the client must encrypt the connection immediately upon connecting to the server before any SMTP-related communication can occur. The server is expecting your client to send an SSL handshake, but your client is not doing that because you set UseTLS=utUseExplicitTLS. That tells TIdSMTP to expect the connection to be initially unencrypted upon connecting to the server and then TIdSMTP can send an explicit STARTTLS command to the server to activate TLS encryption dynamically when needed.

    Thus, TIdSMTP is waiting for the server to send an SMTP greeting, which it never does, and the server is expecting your client to send an SSL handshake, which it never does. A deadlock occurs until one of the parties disconnects.

    If you connect to port 465, you must set UseTLS=utUseImplicitTLS instead. To use UseTLS=utUseExplicitTLS, you need to connect to port 25 or 587 instead.

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

Sidebar

Related Questions

Well I'm trying to send a HTML email using gmail smtp from CI, and
I'm trying to send emails from Joomla! 1.5.9, but keep getting this error message:
I'm trying to send out an email from my as400 unsuccessfully! I'm using this
I am trying to send an email from a Ruby program. The smtp server
I am trying to send email using gmail from my mvc application. I am
I am trying to send email using Exchange 2007 from a console app using
I'm trying to send e-mails from my localhost, using my gmail account, I've looked
I am trying to send a sample email from my rails application. this is
I'm trying to send emails out using MIME::Lite with authentication. Here's the code snippet
I use sendmail to send emails from my ruby-on-rails app. I used this awesome

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.