"SSL is not available on this server" Exception Sending Emails with Indy

Hi

I'm using the Indy (version 10.6.0.5122) TidSMTP component on Delphi XE6 to send emails (see component details below).

object SMTP: TIdSMTP
    OnStatus = SMTPStatus
    IOHandler = IdSSLIOHandlerSocketOpenSSL1
    Host = 'smtp.gmail.com'
    Password = '***'
    Port = 587
    SASLMechanisms = <>
    UseTLS = utUseExplicitTLS
    Username = 'username'
    Left = 480
    Top = 76
  end

object IdSSLIOHandlerSocketOpenSSL1: TIdSSLIOHandlerSocketOpenSSL
    Destination = 'smtp.gmail.com:587'
    Host = 'smtp.gmail.com'
    MaxLineAction = maException
    Port = 587
    DefaultPort = 0
    SSLOptions.Mode = sslmUnassigned
    SSLOptions.VerifyMode = []
    SSLOptions.VerifyDepth = 0
    Left = 480
    Top = 24
  end

 I have the following issue: although it works fine on my computer (Windows 7, on which I have Delphi XE6 installed), I get the following exception on all computers (Windows Server 2012 Foundation, Windows 7) located at a different location when trying to send emails :

"SSL is not available on this server"

Can anyone help me find out what the problem is exactly?

Thanx in advance.
0
Mike
9/12/2014 6:30:23 AM
embarcadero.delphi.winsock 1874 articles. 2 followers. Follow

6 Replies
1014 Views

Similar Articles

[PageSpeed] 54

Mike wrote:

> I have the following issue: although it works fine on my computer
> (Windows 7, on which I have Delphi XE6 installed), I get the following
> exception on all computers (Windows Server 2012 Foundation, Windows 7)
> located at a different location when trying to send emails :
> 
> "SSL is not available on this server"

You are using utUseExplicitTLS, so TIdSMTP will send a STARTTLS command to 
the server when it is ready to encrypt the socket.  The error means that 
either the server is replying with a failure, or it is replying with success 
and TIdSMTP is initiating the SSL/TLS handshake but it is failing before 
it completes.  The latter could be happening for any number of reasons, from 
bad OpenSSL DLLs, to an incorrect SSL/TLS configuration.  There is no way 
to know by looking at the error message by itself.  You are going to have 
to debug into it to find out what is actually going on at the lower levels. 
 Start by using a packet sniffer, such as Wireshark, to see TIdSMTP's STARTTLS 
command and its reply, and to llok at the handshake data to see if there 
is an error being reported by OpenSSL itself.

--
Remy Lebeau (TeamB)
0
Remy
9/12/2014 6:46:33 AM
> {quote:title=Remy Lebeau (TeamB) wrote:}{quote}
> Mike wrote:
> 
> > I have the following issue: although it works fine on my computer
> > (Windows 7, on which I have Delphi XE6 installed), I get the following
> > exception on all computers (Windows Server 2012 Foundation, Windows 7)
> > located at a different location when trying to send emails :
> > 
> > "SSL is not available on this server"
> 
> You are using utUseExplicitTLS, so TIdSMTP will send a STARTTLS command to 
> the server when it is ready to encrypt the socket.  The error means that 
> either the server is replying with a failure, or it is replying with success 
> and TIdSMTP is initiating the SSL/TLS handshake but it is failing before 
> it completes.  The latter could be happening for any number of reasons, from 
> bad OpenSSL DLLs, to an incorrect SSL/TLS configuration.  There is no way 
> to know by looking at the error message by itself.  You are going to have 
> to debug into it to find out what is actually going on at the lower levels. 
>  Start by using a packet sniffer, such as Wireshark, to see TIdSMTP's STARTTLS 
> command and its reply, and to llok at the handshake data to see if there 
> is an error being reported by OpenSSL itself.
> 
> --
> Remy Lebeau (TeamB)

I copied the following files to my software installation directory to no avail:

libeay32.dll
ssleay32.dll
openssl.exe

Please, advise

Edited by: Mike Norayr Monjian on Sep 12, 2014 1:08 AM
0
Mike
9/12/2014 8:14:58 AM
Mike wrote:

> I copied the following files to my software installation directory
> to no avail:
> 
> libeay32.dll
> ssleay32.dll
> openssl.exe

You don't need openssl.exe file, just the DLLs.  But you do have to make 
sure that you are using the *correct* version of the DLLs for your particular 
version of Indy.  You should be using an up-to-date version of OpenSSL.  
You can get teh DLLs from http://indy.fulgan.com/SSL/, where the latest available 
is 1.0.1i.

And did you try sniffing the network traffic, like I suggested?  When dealing 
with network protocols, you need to understand how to do that, it is an important 
debugging skill.

--
Remy Lebeau (TeamB)
0
Remy
9/12/2014 5:20:21 PM
> {quote:title=Remy Lebeau (TeamB) wrote:}{quote}
> Mike wrote:
> 
> > I copied the following files to my software installation directory
> > to no avail:
> > 
> > libeay32.dll
> > ssleay32.dll
> > openssl.exe
> 
> You don't need openssl.exe file, just the DLLs.  But you do have to make 
> sure that you are using the *correct* version of the DLLs for your particular 
> version of Indy.  You should be using an up-to-date version of OpenSSL.  
> You can get teh DLLs from http://indy.fulgan.com/SSL/, where the latest available 
> is 1.0.1i.
> 
> And did you try sniffing the network traffic, like I suggested?  When dealing 
> with network protocols, you need to understand how to do that, it is an important 
> debugging skill.
> 
> --
> Remy Lebeau (TeamB)

1.) Yes. I'm using the latest version 1.01i.
2.) Yes. I used Wireshark. I don't seem to see any errors. This is the tcp stream result while monitoring port 587:
220 mx.google.com ESMTP s7sm13859892wjo.48 - gsmtp
EHLO STEPAGORSERVER
250-mx.google.com at your service, [78.158.130.65]
250-SIZE 35882577
250-8BITMIME
250-STARTTLS
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-CHUNKING
250 SMTPUTF8
STARTTLS
220 2.0.0 Ready to start TLS

after the last command I get the following 3 lines:

50883 -> 587 [FIN, ACK] Seq= 32 Ack=252 Win=65280 Len=0
587 -> 50883 [FIN, ACK] Seq=252 Ack=33 Win43008 Len=0
50883 -> 587 [ACK] Seq= 33 Ack=253 Win=65280 Len=0
0
Mike
9/15/2014 8:35:03 AM
Mike wrote:

> STARTTLS
> 220 2.0.0 Ready to start TLS
> 
> after the last command I get the following 3 lines:
> 
> 50883 -> 587 [FIN, ACK] Seq= 32 Ack=252 Win=65280 Len=0
> 587 -> 50883 [FIN, ACK] Seq=252 Ack=33 Win43008 Len=0
> 50883 -> 587 [ACK] Seq= 33 Ack=253 Win=65280 Len=0

That is a socket disconnect.  If the SSL/TLS handshake fails, Indy does close 
the socket.  Since you are not seeing any handshake data appear in Wireshark, 
that can only mean that Indy is not able to load the OpenSSL DLLs at all. 
 The WhichFailedToLoad(0 function in the IdSSLOpenSSLHeaders unit will tell 
you why Indy could not load the DLLs.

--
Remy Lebeau (TeamB)
0
Remy
9/15/2014 7:44:05 PM
> {quote:title=Remy Lebeau (TeamB) wrote:}{quote}
> Mike wrote:
> 
> > STARTTLS
> > 220 2.0.0 Ready to start TLS
> > 
> > after the last command I get the following 3 lines:
> > 
> > 50883 -> 587 [FIN, ACK] Seq= 32 Ack=252 Win=65280 Len=0
> > 587 -> 50883 [FIN, ACK] Seq=252 Ack=33 Win43008 Len=0
> > 50883 -> 587 [ACK] Seq= 33 Ack=253 Win=65280 Len=0
> 
> That is a socket disconnect.  If the SSL/TLS handshake fails, Indy does close 
> the socket.  Since you are not seeing any handshake data appear in Wireshark, 
> that can only mean that Indy is not able to load the OpenSSL DLLs at all. 
>  The WhichFailedToLoad(0 function in the IdSSLOpenSSLHeaders unit will tell 
> you why Indy could not load the DLLs.
> 
> --
> Remy Lebeau (TeamB)

Hi Remy

I redownloaded from the site you provided above and copied the dll files to my software's installation folder. I also deleted all other dll files in other directories (System32, SysWOW64). Everything's fine now.

Thank you for all the help and guidance.
0
Mike
9/16/2014 11:05:30 AM
Reply:

Similar Artilces:

"SSL" "Mail" and "Code"
Does anybody know of any discussions taking place within Mozilla regarding these 3 bits in the certificate manager? Perhaps I've missed something in the discussions here. In any case, I think a new mechanism for indicating trust w/in the Mozilla apps are needed. Take for example the "StartCom Certification Authority" root. The Certificate Manager (I'm using Firefox on Windows) says it can identify web sites, email users, and code yet the cert itself says it can only be used for signing other certs (essentially, that is). At a minimum this is confusing but I have...

Need to provide a "please wait" status to user while sending emails followed by a "emails sent" status.
Here's what I would like to happen:1. User clicks a button to send an email message to all addresses in database2. At the beginning of this process, a label on the page provides a "Please Wait" message to user.3. When the last email has been sent, the label provides a "Emails Sent" message. What happens instead is that all emails are sent successfully, but the "Please Wait" message never makes it to the screen.  The "Email Transmission Complete" text does, however make it to the screen.  Can anybody tel...

How to programmatically "Add Exception" on "Servers" tab in Certificate Manager.
I am using the NSS certutil.exe app command line to add a self-signed certi= ficate to Firefox. Using the command line I'm able to get my certificate to= show up in the Certificate Manager under the "Authorities" and "Others" ta= bs. I have even gotten it to show up in the "Servers" tab. However, when it= does the "Server" column has a "*". When I navigate to my website I still = get a certificate warning. I noticed that when I manually add the exception the "Server" column says t= he name and port of my site. It seems ...

.ALLCOL("%COLUMN%", " ", ", ", ", ")
Do you know anyway for me to exclude a subset of columns returned by this function. We have two columns (rec_user and rec_datetime) which are in all of our tables, but when generating triggers I want automatically generate a script which does not include those two columns but does include all other columns in that table. Bruce I should add that I am using PD 9.0.0.580. Bruce "Bruce Lamb" <lamb.bruce@mayo.edu> wrote in message news:6HgI315nCHA.155@forums.sybase.com... > Do you know anyway for me to exclude a subset of columns returned by this > function. ...

Precedence of "where" ("of", "is", "will")?
Nobody on #perl6 today could answer this one. Is: Str | Int where { $_ } the same as: (Str | Int) where { $_ } or: Str | (Int where { $_ }) ? Followup questions, Mr. President: What kind of operators are "where", "of", "is", and "will"? Is there a reason that S03 doesn't list them? What are their precedence(s)? -- Chip Salzenberg - a.k.a. - <chip@pobox.com> Open Source is not an excuse to write fun code then leave the actual work to others. Chip Salzenberg writes: &...

"Changing" vs "Available"
What is the difference between the "Changing" and "Available" attribute test? -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 http://developer.novell.com/documentation/dirxml/dirxmlbk/ref/dirxmlscript/if-op-attr.html Good luck. IDM User wrote: > What is the difference between the "Changing" and "Available" attribute > test? > -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHEXHV7eGRNwWOK9IRAiC2AKCa31xk5FCwA8vcdH5GLkptd1vX7gCeNp...

Server abends after "down" or "restart"
Hi, I have a brandnew Server with NW6 SP3 and 2 x xeon 2,4 ghz intel se7501br2 board and ICPVortex gdt 8514rz Raid-controller. The Server crash after "down" or "restart" command with an abend on "server.nlm" Any Ideas ?? greetings micha Please post the *complete* last entry in sys:system\abend.log that starts with "abend 1" or "break 1". Thank you. -- Andrew C Taubman Novell Support Connection Volunteer SysOp http://support.novell.com/forums (Sorry, support is not provided via e-mail) OneNet is better than...

No "Mail" or "Email" button
Name: David Grove Email: ddotgroveatrogersdotcom Product: Firefox Summary: No "Mail" or "Email" button Comments: I cannot see a way to email a web page on any of the Firefox toolbars using my own email service only the "Send to" button which forces the user to use Gmail. And I've looked through "Help" and your website with no success. I shouldn't have to look so hard - it should be EASY to find, if it's there which I suspect it isn't. For this reason I'm uninstalling Firefox. Asta la vista, baby! Browser Details:...

quotes, quotes, quotes...
I am getting this error and I know what is causing it, but I have no idea how to fix it, any help would be great. The script steps through the /var/log/messages file on a linux server and puts The entries into a mysql database. However when it gets to the 'hlt' line in the messages file it just barfs. The single quotes are freaking it out. I know about quotes but not how to use in this situation. Thanks, Paul Error: May 27 17:53:00 localhost kernel: Checking 'hlt' instruction... OK. <----- doesn't like this in the messages file DBD::mysql::st exec...

No "Available layouts" to "Add>>" to "Active layouts"
I have US English, Russian and Ukrainian languages in Country/Region & Language. The list of "Available layouts" is empty, any suggestions what to do? Before I removed few packages using YAST, so probably I miss some package? -- magner58 ------------------------------------------------------------------------ > The list of "Available layouts" is empty, any suggestions what to do? i am confused....where are you seeing this "Available layouts"? is that in YaST System > Languages, or ??? -- DenverD (Linux Counter 282315)...

Old Emails "Transfer Failed" already "Delivered" and "Opened"
I have had this happen a couple times in the last several months, to different users in different PO's. A user will receive undeliverable email messages bounce, but they sent the email months ago and this is the first negative response. The sent items show the originals as delivered and opened. One of the entries though has "Transfer Failed" for a PO we don't have anymore it's been removed from the domain. Correct me if I'm wrong but "Transferred" means through the GWIA and "Delivered" is not. So I guess the messages were sent thro...

Replacing "\\" with "\"
Hi all I'm getting this value from a CheckBoxList control - a location of file, i have to remove "\\" and replace it with "\" and pass it to Query, how to do it, i tried with Replace, but coud'nt suceed. "\\\\Blaze10xp\\BLZ_SFS_07\\Sample Excel Files\\Excel Files\\report2.xls" thank's in advance - Prakash.C you tried Replace like this? string newstring = oldstring.Replace(@"\\",@"\");Plese, do not forget to click "Mark as Answer" on the post that helped you. Thanx!My blog: Scenes From A Developer Memory yes i tr...

Using "+" or "||"
Using SQLAnywhere 5.5.04, I've gotten into the habit of using "||" in ISQL to indicate a string concatenation. I needed to paste my SQL statement into the PowerBuilder script painter for some embedded SQL, and PB didn't like the "||" very much at all. I changed it to "+" and it seems to be ok. Do these two operators indicate ~exactly~ the same thing? moin, afaik these two's are not the same! if you're using "||" and any term is NULL then in the resultstring the term will be ignored if you use "+" then the resu...

replace the "." with a ","
Oi.... I need to build a small programm in ASP.NET and chose to use C# for it.Now i got everything working but there's one little problem.the first textbox is a double. I need to make it so that when someone enters a "." then it gets replaced by a ","any ideas?Ghan  string blah = "4.2.2.2";blah = blah.Replace(".", ",");Ryan Ryan OlshanASPInsider | Microsoft MVP, ASP.NEThttp://ryanolshan.comHow to ask a question...

Web resources about - "SSL is not available on this server" Exception Sending Emails with Indy - embarcadero.delphi.winsock

Resources last updated: 11/26/2015 8:12:29 AM