Re: Check Pop3 or IMAP4
- From: noone@xxxxxxx (Reventlov)
- Date: Mon, 22 Sep 2008 20:41:26 GMT
Il giorno Wed, 17 Sep 2008 19:50:04 -0700, "TDM" <rpuffd@xxxxxxxxx> ha scritto:
It sounds like you at least know the POP protocol. If I was tasked with
this, I would use the .Exec method to telnet to the POP server via port
110, then use StdIn and StdOut to process the POP commands and
resulting output. This may not be doable(not sure if that is really a word),
but that is the approach I would take to see if it is possible.
I read somewhere that telnet does not support stdin and stdout. But never tried.
A post in this newsgroup (22 october 2003) used sendkeys to automate telnet.
I used NetCat (NC.exe, a 50 kb file) to send commands to the port 110.
With netcat I build a command to invoke the command and then redirect input and output.
I tried to read the stdin but encountered some errors (if I remember well, read past the
end of file). Maybe I had to wait for a while until the output was created.
I didn't use this script anymore as my provider implemented a spam killer application.
This works only if the server doesn't require the encoding of the password, as the string
provided by the server for the encoding cannot be read dynamically while the connection is
open. It could be done using stdin and stdout.
Title="PopMail - Cenati"
set wshShell = CreateObject("WScript.Shell")
' Crea l'oggetto FileSystemObject
Set fso = WScript.CreateObject("Scripting.FileSystemObject")
Const ForWriting = 2
'User="Ci@xxxxxxxxxxxx"
'Password="x"
'Server="pop.y.com"
fso.CreateTextFile "command.txt",true
Set txtStream=fso.OpenTextFile("command.txt",ForWriting)
TxtStream.WriteLine "user " & user
TxtStream.WriteLine "pass " & password
TxtStream.WriteLine "stat"
TxtStream.WriteLine "quit"
txtStream.Close
wshShell.run "%comspec% /C nc.exe " & server & " 110 <command.txt >output.txt",7,true
Set oFile = fso.OpenTextFile("output.txt")
testo = oFile.ReadAll
oFile.Close
msgbox testo
--
Giovanni Cenati (Bergamo, Italy)
Write to "Reventlov" at katamail com
http://digilander.libero.it/Cenati (Esempi e programmi in VbScript)
--
.
- References:
- Check Pop3 or IMAP4
- From: Alan Fisher
- Re: Check Pop3 or IMAP4
- From: TDM
- Check Pop3 or IMAP4
- Prev by Date: Re: Input Type Hidden and Checkbox?
- Next by Date: Re: function parameters...by reference or by value?
- Previous by thread: Re: Check Pop3 or IMAP4
- Next by thread: Re: Check Pop3 or IMAP4
- Index(es):
Relevant Pages
|
Loading