Command-line mail as a service
Command-line mail as a service
am 25.05.2005 17:38:38 von altufaltuz
Hello all,
I would like a mail from my PC at work containing its IP Address after
it restarts. Every time it gets a new IP Address. I can't use regular
SMTP as no relaying is allowed.
Here's what I'm doing: I've configured Outlook Express with YahooPOPs
to send mail out to my Yahoo address. Works great. Next, I'm using
Postie for command line mailing. I'm running this batch file:
-------------snip------------------
for /f "tokens=1-5 delims= " %%a in ('ipconfig ^| grep "IP Address" ^|
cut -d":" -f2') do set ip=%%a
D:\tmp\postie\postie.exe -mx -to:abc@yahoo.com -from:abc@yahoo.com
-pass:password -s:IP-change -msg:%ip%
-------------snip------------------
I do manage to get an email if I just plain execute this batch file.
However, due to my requirements to run this as a service (to run prior
to my logging in), I've used nssm to service-ify my batch file. The
service is set to automatic. However, I'm not getting any mails.
Any and all help would be highly appreciated.
Thanks in advance.
Re: Command-line mail as a service
am 26.05.2005 14:48:35 von Andrew Butchart
I believe the Windows resource kit has a wrapper that will turn most any
program into a service. It works fairly well as long as there is not use
interface involved. You might have a problem with Outlook Express though as
it uses the current user for a profile. If you search around, there's a
free SMTP mailer for Windows called BLAT that I've used a lot.
--
Andrew Butchart
andrew@floatingbear.ca
wrote in message
news:1117035518.597992.94850@g49g2000cwa.googlegroups.com...
> Hello all,
>
> I would like a mail from my PC at work containing its IP Address after
> it restarts. Every time it gets a new IP Address. I can't use regular
> SMTP as no relaying is allowed.
>
> Here's what I'm doing: I've configured Outlook Express with YahooPOPs
> to send mail out to my Yahoo address. Works great. Next, I'm using
> Postie for command line mailing. I'm running this batch file:
>
> -------------snip------------------
>
> for /f "tokens=1-5 delims= " %%a in ('ipconfig ^| grep "IP Address" ^|
> cut -d":" -f2') do set ip=%%a
> D:\tmp\postie\postie.exe -mx -to:abc@yahoo.com -from:abc@yahoo.com
> -pass:password -s:IP-change -msg:%ip%
>
> -------------snip------------------
>
> I do manage to get an email if I just plain execute this batch file.
>
> However, due to my requirements to run this as a service (to run prior
> to my logging in), I've used nssm to service-ify my batch file. The
> service is set to automatic. However, I'm not getting any mails.
>
> Any and all help would be highly appreciated.
>
> Thanks in advance.
>
Re: Command-line mail as a service
am 26.05.2005 15:31:24 von altufaltuz
Thank you Andrew for your response.
However, I've managed to do the "program into a service" bit. Not using
Windows' resource kit srvany & instsrv, but NSSM - the Non-Sucking
Service Manager, heh heh. Works great. I've tried Blat, but I prefer
Postie, a Win32 console mode command-line email program.
The issue is rightly what you've caught on to, the Outlook Express
using the current user for it's profile. How do I circumvent this?
Thanks again
Re: Command-line mail as a service
am 28.05.2005 14:30:56 von Andrew Butchart
I'm not sure how to set Outlook Express to open with a specific profile. A
quick search seems to indicate that you can set up OE so that it isn't
supporting multiple profiles which might solve your problem.
--
Andrew Butchart
andrew@floatingbear.ca
wrote in message
news:1117114284.392750.168540@g47g2000cwa.googlegroups.com.. .
> Thank you Andrew for your response.
>
> However, I've managed to do the "program into a service" bit. Not using
> Windows' resource kit srvany & instsrv, but NSSM - the Non-Sucking
> Service Manager, heh heh. Works great. I've tried Blat, but I prefer
> Postie, a Win32 console mode command-line email program.
>
> The issue is rightly what you've caught on to, the Outlook Express
> using the current user for it's profile. How do I circumvent this?
>
> Thanks again
>