Menu

#61 Connection to server dropped

v1.0 (example)
open
nobody
None
5
2024-05-25
2024-05-15
No

Hi there,
I'm a newbie and I'm trying to get blat to work on windows. I have Blat v3.2.24 (build : Feb 9 2022 21:19:39).

I installed it as below - had to run as admin otherwise access to the registry was denied
blat -installSMTP smtp.gmail.com ehsshearer@gmail.com

Then I tried to send a msg
blat testmsg.txt -to steve.shearer@gatech.edu -pw mypassword -debug -log blat.log -superDuperDebug -port 465

And I got the log below where I see that the connection to the server was dropped
Error: Connection to server was dropped.

I have tried to follow the rather clear instructions in the readme file, and I've done a bit of seaching for people with similar issues - to no avail.
Oh, I did do -install, and then -installSMTP - neither worked.

I'm probably doing something silly - my apologies if I am. I would greatly appreciate some guidance.

Regards
Steve

Full log follows

2024.05.14 18:30:01 (Tue)------------Start of Session-----------------
superDuperDebug: leaving processOptions()
Blat v3.2.24 (build : Feb 9 2022 21:19:39)
64-bit Windows, Full, Unicode
superDuperDebug: line 707, exitRequired = 0, retcode 0
superDuperDebug: line 844, bodyFileName = >>testmsg.txt<<
superDuperDebug: entering GetRegEntry()
superDuperDebug: entering SearchForRegEntry()
superDuperDebug: entering GetRegEntryKeyed()
superDuperDebug: leaving GetRegEntryKeyed()
superDuperDebug: leaving SearchForRegEntry()
superDuperDebug: leaving GetRegEntry()
superDuperDebug: calling processOptions() near line 916
superDuperDebug: entering processOptions()
superDuperDebug: leaving processOptions()
superDuperDebug: line 933, exitRequired = 0, retcode 0
superDuperDebug: line 1027, bodyFileName = >>testmsg.txt<<
superDuperDebug: line 1036, file handle = 268
superDuperDebug: entering searchReplaceEmailKeyword()
superDuperDebug: leaving searchReplaceEmailKeyword()
superDuperDebug: entering searchReplaceEmailKeyword()
superDuperDebug: leaving searchReplaceEmailKeyword()
superDuperDebug: entering searchReplaceEmailKeyword()
superDuperDebug: entering parseCommaDelimitString()
superDuperDebug: leaving parseCommaDelimitString()
superDuperDebug: leaving searchReplaceEmailKeyword()
superDuperDebug: line 1222, attempting to open bodyFileName = >>testmsg.txt<<
superDuperDebug: line 1253, filesize = 4
superDuperDebug: line 1264, calling ReadThisFile()
superDuperDebug: line 1273, ReadThisFile() returned 1
superDuperDebug: entering checkInputForUnicode()
superDuperDebug: leaving checkInputForUnicode()
superDuperDebug: entering collectAttachmentInfo()
superDuperDebug: leaving collectAttachmentInfo()
superDuperDebug: entering send_email()
superDuperDebug: entering prefetch_smtp_info()
superDuperDebug: entering say_hello()
superDuperDebug: entering open_server_socket()
superDebug: init_winsock(), WSAStartup() returned 0 (NO_ERROR)
superDebug: Hostname <smtp.gmail.com> resolved to ip address 142.250.113.109
superDebug: Official hostname is smtp.gmail.com
superDebug: Attempting to connect to ip address 142.250.113.109, on port 465
superDuperDebug: leaving open_server_socket()
superDuperDebug: entering get_server_response()
Error: Connection to server was dropped.
superDuperDebug: leaving get_server_response()
superDuperDebug: entering close_server_socket()
superDuperDebug: leaving close_server_socket()
superDuperDebug: entering server_error()
*** Error *** SMTP server error
superDuperDebug: leaving server_error()
superDuperDebug: entering finish_server_message()
superDuperDebug: entering put_message_line()
Error: Not a socket.
superDuperDebug: leaving put_message_line()
superDuperDebug: entering get_server_response()
Error: Not a socket.
superDuperDebug: leaving get_server_response()
superDuperDebug: leaving finish_server_message()
superDuperDebug: leaving say_hello()
superDuperDebug: leaving prefetch_smtp_info()
superDuperDebug: leaving send_email()
superDuperDebug: entering send_news()
superDuperDebug: leaving send_news()
superDuperDebug: entering releaseAttachmentInfo()
superDuperDebug: leaving releaseAttachmentInfo()
2024.05.14 18:30:12 (Tue)-------------End of Session------------------</smtp.gmail.com>

Discussion

  • Steve Shearer

    Steve Shearer - 2024-05-15

    Hi there, any guidance greatly appreciated
    Regards
    Steve

     
  • Chip

    Chip - 2024-05-25

    The issue is that you are trying to connect to Google through an encrypted session port. How I have been able to get this done is to use stunnel to provide that encrypted session support. I was going to post a link to message threads that discuss this very topic, but I am not finding them just yet. Essentially, you would need to tell Gmail to allow less secure applications to access your account (there is a setting for this), and then install the free tool called stunnel. With this done, you point Blat to use your local connection instead of using smtp.gmail.com. The local connection would be 127.0.0.1, on a port number of your choosing. This port number must be in your stunnel.conf file to allow stunnel to listen on that port for your Blat connection request.

    My stunnel.conf has the following related to Gmail:

    CAfile = cert.pem
    cert = client.pem
    client = yes
    RNDfile = .rnd
    fips = no
    output = stunnel.log
    sslVersion = TLSv2
    
    [gmail smtp]
    accept = 27
    connect = smtp.gmail.com:587
    protocol = smtp
    
     
  • Chip

    Chip - 2024-05-25

    With the above stunnel configuration, I would tell Blat to connect to 127.0.0.1:27, where the semicolon (:) separates the IP address from the port number. Stunnel is configured to listen to port 27, and when a connection request is received from Blat on that port, it will establish an encrypted session with Gmail, allowing Blat to be none-the-wiser while sending your emails.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.