When I type blat /? to get instructions on how to use blat, it shows me there is a -SaveSettings switch I can use to save SMTP settings to the Windows Registry.
I could not get the -SaveSettings switch to work with the -u and -pwd switches for SMTP authentication, but -it worked with -install.
Perhaps the -SaveSettings switch is deprecated and should be removed from /? help output.
Blat is wonderful! I just want it to be even more perfect!
Here's what happens:
C:\>blat -SaveSettings -f firstname.lastname@example.org -server smtp.k.net -port 25 -try 2 -profile default -u email@example.com -pwd abcdef123
Blat v2.6.2 w/GSS encryption (build : Feb 25 2007 12:06:19)
Blat saw and processed these options, and found fault with the last one...
Not enough arguments supplied for option: -SaveSettings
Blat found fault with: -SaveSettings
-SaveSettings : store common settings to the Windows Registry. Takes the same parameters as -install, and is only for SMTP settings.
I'm following the instructions from the output of blat -h.
Why isn't is working?
The reason I want to do this is because I want to save the SMTP authentication username and password in the registry so I don't have to type it in every time I send with blat.
I can't say whay -SaveSettings isn't working. Blat is fussy about syntax, there could be something missing from the command line or there could be atypo, "-pwd" rather than "-pw". Anyway, this will save your settings to the registry:
blat -install smtp.k.net firstname.lastname@example.org 2 - - email@example.com abcdef123
The first standalone dash is the port number. Port 25 is the default, it need not be specified.
The second dash is the profile name. Since you want to set blat's default configuration, you should not specify a profile name. If you call it "default", it will store these settings in a subkey named "default". You will have to refer to it by name in subsequent calls to blat, as in
blat message.txt -p default -to firstname.lastname@example.org ...
Using a dash instead of a profile name saves the settings in the parent registry key, i.e. blat's default settings. This way you can call blat without specifying the profile, as in
blat message.txt -to email@example.com ...
"firstname.lastname@example.org", the "sender", is what is displayed in the "From:" field of incoming email messages. Your messages will appear as "From: email@example.com". You can enhance that by putting the email address between brackets (or braces?), after a display name of your choosing. For example, saving the sender as "Harry Potter <firstname.lastname@example.org>" will change the
appearance of your messages to "From: Harry Potter". To do that you would change the above command line to
blat -install smtp.k.net "Harry Potter <email@example.com>" 2 - - firstname.lastname@example.org abcdef123
The double-quotes are necessary.
Finally, regedit can export blat settings to a .reg file that can be used to apply the same settings on other computers (or restore them on the original). You need only double-click on the file to save its contents to the registry..