Email status on job done, without password

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
moshiko
Posts: 3
Joined: 06 Aug 2015 11:32

Email status on job done, without password

#1 Post by moshiko » 06 Aug 2015 11:42

Hi,

I am running a long job via batch script and would like to email myself when the job is done.
I found out a bunch of guides on the iNet but eventually all requires me to specify my username/password explicitly in the script, which is obviously insecure.

The solution I am interested should allow me to log in once, keep my password in some encrypted format, and then use it when I want to send an email.
I can open an ssh via putty to a linux station so maybe there is some way I can tell that machine to send the email from its shell command line (which does not require another username/password since I already logged in).
However, I am not aware of how to perform this?


Would appreciate your help,
-Moshe.

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: Email status on job done, without password

#2 Post by foxidrive » 07 Aug 2015 07:15

You'd need a script that runs in Putty that then does scripting on the Linux server.

You could create a throwaway email account that just emails your regular address, and the password and username is not an important account to a person.

moshiko
Posts: 3
Joined: 06 Aug 2015 11:32

Re: Email status on job done, without password

#3 Post by moshiko » 09 Aug 2015 03:34

can you be more specific? how do I script something in dos batch that sends email via putty?

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: Email status on job done, without password

#4 Post by foxidrive » 09 Aug 2015 04:01

Putty would have to run a script using telnet commands, assuming it can do so.

You are limited to telnet commands as to what you can do on the Linux server.
A batch file can write the telnet commands into a telnet script for Putty.

moshiko
Posts: 3
Joined: 06 Aug 2015 11:32

Re: Email status on job done, without password

#5 Post by moshiko » 09 Aug 2015 05:47

OK. Thanks for your suggestions. I will check them out.

Post Reply