Re: Issues with blat -install

"[email protected] [blat]" <[email protected]> Sat, 10 Jun 2017 11:34:06 +0700
Newsgroups gmane.mail.blat
Message-ID <[email protected]>
Thanks. Tried to run beat -install with the parameters you mentioned. Still nothing. Did run both a batch file as well as a command line. The echo is in both cases:
SMTP server set to smtp.provider.com on port 586 with user -from, retry 5 time(s)
Seems it gets confused by the -from parameter
Looking into the registry (Now here on a Windows 7 32 Bit VM)
In HKEY_Local_MACHINE SOFTWARE a new Entry Public Domain
Here an new entry Blat

and here’s the exported regfile:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Public Domain]

[HKEY_LOCAL_MACHINE\SOFTWARE\Public Domain\Blat]
"SMTP Server”=“smtp.provider.com"
"SMTP Port"="586"
"Try"="5"
"Login"="YmJ0c3VwcG9ydEBjcHR5b3N"
"Pwd"="YmFihOTY="
"Sender"="-from"


The Servers address was correct, I edited it here for privacy. Also edited a few chars of the “Login” and “Pwd” string.

I did read the other comment about security. Still funny as I originally got it running on my 64 bit machine a few days ago, without much headache.
Only after I tried to recreate it yesterday these strange results appear. Issues with ACL or the like would possibly prevent blat.exe either in the the batch or the command line to write to registry. But writing seemingly nonsense?

Later today I will try on both a Windows 7 32 Bit as well as Windows 10 32 Bit to see what happens. Unfortunately our POS can’t run under Windows 10 due to necessary Hardware drivers not available.

Next step on my Win7 32 VM: Edited the exported .reg file with correct values and double-clicked it. Now values in registry seem correct.
So running a .reg file is probably the solution then?

Still wondering whats going on here?Does beat -install store the username and Password scrambled?

Considering passing the SMTP Parameters with the full command is another option. Where in the command line must they be sent?

Here is our current beat.exe command. It is invoked inside a FOR DO loop:

"%WORKDIR%\Blat\blat.exe" "%%f" -tf "%WORKDIR%\Blat\recipients.txt" -cf "%WORKDIR%\blat\ccrecipients.txt" -bf "%WORKDIR%\Blat\bccrecipients.txt" -subject "Your Sales Results from %%d" -sig "%WORKDIR%\Blat\sig.txt" -debug -log "%WORKDIR%\Blat\log.txt"

%%f refers to the current text file inside the loop. I was under the impression that it does not matter where in the line the SMTP Parameters are, so I put them at the end. Didn’t work. Put them right after the filename  Didn’t work. Didn’t yet attempt to permutate the order …

Any help is greatly appreciated!

I will look into the STunnel shortly. I did not have any issues with sending with port 586 in my test runs as well as running a different automated mailer utility using Port 586 and SSL/SLT on a few client machines. Unfortunately this other utility has been abandoned by the programmer and is also not able to be evoked from a batch file. 



> On Jun 10, 2017, at 00:13, 'Chip' [email protected] [blat] <[email protected]> wrote:
> 
> 
> > Either I am confused with the blat -install syntax, or Blat is?
> >
> > Running Blat Version 3.2.17 32 Bit. I am currently running under 64 Bit 
> > Windows 7, reason for this is I intend to install blat for several of our 
> > clients, which all are running 32 Bit.
> >
> > This maybe is the issue I describe, but I have run a test install on a 32 
> > Bit Windows 7 machine with similar confusing results.
> >
> > My intention is to create a blatinstall.bat file, which will be run once 
> > on the client PCs prior to using Blat in a POS Project.
> >
> > The Syntax of Blat -install is a bit confusing for me, especially as the 
> > mail server I intend to use on the client PCs requires SMTP 
> > authentification per user name (Full Email address) and Password, and I 
> > cant get the -install to do what I intend to do.
> >
> > Here's the Syntax I found:
> >
> > -install <>[SMTP|NNTP|POP3] <server addr> <sender's email addr> [<try n times>
>                 [<port> [<profile> [<username> [<password>]]]]]
>                 : set server, sender, number of tries and port for profile
>                   (<try n times> and <port> may be replaced by '-')
>                   port defaults are SMTP=25, NNTP=119, POP3=110
>                   default profile can be specified with a '-'
>                   username and/or password may be stored to the registry
>                   order of options is specific
> >
> > So the command line should be blat -installSMTP smtp.provider.com <http://smtp.provider.com/>
> > [email protected] <mailto:[email protected]> 5 586 default [email protected] <mailto:[email protected]> password
> >
> > I skipped the Profile here as it is supposed to be optional? Also tried to 
> > create a Profile "BBT". With the Profile created, I have to append the 
> > command with a -p BBT? Where in the command line?
> >
> > Opening the registry in regedit I find the Key "Blat" inside 
> > HKEY_LOCAL_MACHINE SOFTWARE WOW6432NODE PUBLIC DOMAIN
> >
> > Here is a new Entry "Blat" with a Subentry "bbt" (Name of the Profile I 
> > created, but in lowercase (?)
> >
> > The entries in bbt are correct for Sender SMTP Port SMTP Server and Try, 
> > but the entries for Login and Pwd are both a series of scrambled 
> > characters?
> >
> > Blat is not sending email, the -debug log shows:
> >
> > 2017.06.09 13:38:34 (Fri)------------Start of Session-----------------
> > Blat v3.2.17 (build : Aug 10 2016 22:32:21)
> > 32-bit Windows, Full, Unicode
> > Read 2 TO addresses from C:\POS\Blat\recipients.txt
> > Read 1 CC address from C:\POS\blat\ccrecipients.txt
> > Read 0 BCC addresses from C:\POS\Blat\bccrecipients.txt
> > Failed to open registry key for Blat
> > To set the SMTP server's name/address and your username/email address for 
> > that server machine do:
> > blat -install  server_name  your_email_address
> > or use '-server <server_name>' and '-f <your_email_address>'
> > aborting, nothing sent
> > 2017.06.09 13:38:34 (Fri)-------------End of Session------------------
> >
> > It was working well until I decided to look into the creation of a Batch 
> > File, now it seems I have broken the Installation.
> >
> > Could someone take me by the hand and show me how to create a 
> > blatinstall.bat that has no specific Profile and also stores the SMTP 
> > login credentials?
> >
> > I know I know I should have saved the Registry .! ..
>  
>  
> Manfred,
>  
> Blat.exe –install –server smtp.provider.com <http://smtp.provider.com/> –from [email protected] <mailto:[email protected]> –try 5 –port 586 –u [email protected] <mailto:[email protected]> –pwd password
>  
>  
> This will give you the settings you need, and store it to the default location.  HOWEVER, using port 586 requires SSL or TLS encryption that is not provided directly with Blat.  Instead, I tell folks to use a program called STUNNEL (https://www.stunnel.org/index.html <https://www.stunnel.org/index.html>) to provide that encryption layer.  I do this because there are good folks who maintain the OpenSSL library should any problems or vulnerabilities appear in the SSL and TLS protocols.
>  
> If you have a few minutes, search the Yahoo groups site for references to stunnel, and you will find example configuration files that I and others use.  Otherwise, feel free to send email direct to me at home ([email protected] <mailto:[email protected]>) and I will my best to help.
>  
> Chip
>  
> 
>