Discussion:
Subject not working
(too old to reply)
christattersall@orange.fr [blat]
2018-08-12 15:56:26 UTC
Permalink
Hello,


Great little program. Thanks for that.


Just a small problem: I have just installed Blat v3.2.19 (build : Nov 18 2017 03:14:35 and the -subject option no longer seems to work. I always get "Contents of file: xxx" in the subject line. Same with -sf. It worked on the previous release I used: Blat v3.2.12 (build : Dec 4 2015 19:33:50)


Regards
Chris
'Chip' chip.programmer@att.net [blat]
2018-08-16 02:37:11 UTC
Permalink
Post by ***@orange.fr [blat]
Hello,
Great little program. Thanks for that.
Just a small problem: I have just installed Blat v3.2.19 (build : Nov 18
2017 03:14:35 and the -subject option no longer seems to work. I always
get "Contents of file: xxx" in the subject line. Same with -sf. It worked
on the previous release I used: Blat v3.2.12 (build : Dec 4 2015
19:33:50)
Regards
Chris
Chris,

I am not sure what is wrong, it is working for me. Would you post your
command line without any userids or passwords, please? With that I can
check the source code and check what might be wrong.

Thanks,
Chip
christattersall@orange.fr [blat]
2018-08-16 09:26:29 UTC
Permalink
Thanks for responding Chip. Here is the info.




xcopy d:backup.zip e: /Y

if %ERRORLEVEL% GEQ 1 goto Error
c:\windows\system32\blat c:\backup_zip.txt -to ***@xxx.com -server smtp.xxx.com -u ***@xx.com -pw xxxxxxxx
timeout 1000 -sf c:\backup_zip.txt
exit
:Error
c:\windows\system32\Blat c:\backup2_zip.txt -to ***@xxx.com -server smtp.xxx.com -u ***@xx.com -pw xxxxxx -sf c:\backup2_zip.txt


backup.zip.txt contains:


Weekly backup copy successful. Please change USB stick in drive F:



Resulting email:


-----Original Message-----
From: ***@xxx.com [mailto:***@xxx.com]
Sent: 12 August 2018 17:36
To: ***@xxxx.com
Subject: Contents of file: backup_zip.txt

Weekly backup copy successful. Please change USB stick in drive E:




Same thing with -subject "Weekly backup copy successful. Please change USB stick in drive F:"



Thanks
Chris
'Chip' chip.programmer@att.net [blat]
2018-08-16 14:53:47 UTC
Permalink
Post by ***@orange.fr [blat]
Thanks for responding Chip. Here is the info.
xcopy d:backup.zip e: /Y
if %ERRORLEVEL% GEQ 1 goto Error
timeout 1000 -sf c:\backup_zip.txt
exit
:Error
-----Original Message-----
Sent: 12 August 2018 17:36
Subject: Contents of file: backup_zip.txt
Same thing with -subject "Weekly backup copy successful. Please change USB stick in drive F:"
Thanks
Chris
The first line after checking ERRORLEVEL does not use the -sf or -subject option, which is why your outgoing emails say "Subject: Contents of file: backup_zip.txt". It appears to me that you intend to use -timeout option with Blat, but there are two problems with this:
1) it should be -ti, not -timeout,
2) it is not on the same line as your other blat options.

If you change the first Blat line to the following, I believe it will do what you want:

c:\windows\system32\blat c:\backup_zip.txt -to ***@xxx.com -server smtp.xxx..com -u ***@xx.com -pw xxxxxxxx -ti 1000 -sf c:\backup_zip.txt

Of course, you need to change the X’s above to be correct values for your server.
--
Chip

[Non-text portions of this message have been removed]
'Chip' chip.programmer@att.net [blat]
2018-08-20 05:54:17 UTC
Permalink
Thanks Chip. It's working now, although I had been using it (not with the erroneous syntax of course) for about 4 years with the old version. The timeout was for testing purposes, that I never removed, so that I could read what was on the screen when initiating it from the Task Scheduler. I think the old version supported timeout in full as it worked and didn't give an error message. I updated the bat file to put in the -sf parameters when the subject line was incorrect with the new version.
Anyway, that's IT! Thanks again.
Chris
I checked all old versions of Blat that I have, going back to 2.50 on my F: drive, and found no instance where –timeout is a supported option. That leaves me to suspect your batch file was recently edited, perhaps by mistake, so that the –sf option was no longer on the same line as Blat executable.

Glad to know you are back in business.

Chip

[Non-text portions of this message have been removed]
PJH_YAHOO p_holsberg@yahoo.com [blat]
2018-08-31 20:22:51 UTC
Permalink
Kroc ortho Orrick
Post by ***@orange.fr [blat]
Hello,
Great little program. Thanks for that.
Just a small problem: I have just installed Blat v3.2.19 (build : Nov
18 2017 03:14:35 and the -subject option no longer seems to work. I
always get "Contents of file: xxx" in the subject line. Same with -sf.
It worked on the previous release I used: Blat v3.2.12 (build : Dec 4
2015 19:33:50)
Regards
Chris
PJH_YAHOO p_holsberg@yahoo.com [blat]
2018-08-31 20:24:00 UTC
Permalink
Oops. Sorry.
Post by PJH_YAHOO ***@yahoo.com [blat]
Kroc ortho Orrick
Post by ***@orange.fr [blat]
Hello,
Great little program. Thanks for that.
Just a small problem: I have just installed Blat v3.2.19 (build : Nov
18 2017 03:14:35 and the -subject option no longer seems to work. I
always get "Contents of file: xxx" in the subject line. Same with -sf.
It worked on the previous release I used: Blat v3.2.12 (build : Dec 4
2015 19:33:50)
Regards
Chris
Continue reading on narkive:
Loading...