![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Check Pop3 or IMAP4 Is there any built in way to check a POP3 or IMAP4 server for e-mail, and download a message form said server? I have written some scripts with WinBatch, but would like to move it to VB I just can't find anyway to Poll the server, and download the message. My current code checks the POP3 Server for a message, then downloads the Oldest message, and then Parses it (the parsing is the reason for the whole script) after Parsing, I then log back to the server, and delete the e-mail, while this is VERY doable in WB, it's slow and hard to automate the execution of the WB Script automatically. If I could do the same in VB I could use the Built-in Scheduler in windows to run the script (I can't do that with WB because it needs an interpreter which I can't afford, windows has a Built in VB interpreter |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Check Pop3 or IMAP4 "Alan Fisher" <alan@xxxxxx> wrote in message news:91F008A9-8416-4C4B-BD2C-DA4BF109FFA8@xxxxxx Quote: > Is there any built in way to check a POP3 or IMAP4 server for e-mail, and > download a message form said server? > > I have written some scripts with WinBatch, but would like to move it to VB I > just can't find anyway to Poll the server, and download the message. My > current code checks the POP3 Server for a message, then downloads the Oldest > message, and then Parses it (the parsing is the reason for the whole script) > after Parsing, I then log back to the server, and delete the e-mail, while > this is VERY doable in WB, it's slow and hard to automate the execution of > the WB Script automatically. If I could do the same in VB I could use the > Built-in Scheduler in windows to run the script (I can't do that with WB > because it needs an interpreter which I can't afford, windows has a Built in > VB interpreter > > 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. It is possible in VB, I once wrote an app in VB to do this. If you are OK with using third party tools, you might have a look here : http://www.activexperts.com/ActivEmail/ TDM |
My System Specs![]() |
| | #3 (permalink) |
| | Re: Check Pop3 or IMAP4 Il giorno Wed, 17 Sep 2008 19:50:04 -0700, "TDM" <rpuffd@xxxxxx> ha scritto: Quote: >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. 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@xxxxxx" '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) -- |
My System Specs![]() |
| | #4 (permalink) |
| | Re: Check Pop3 or IMAP4 I had looked at the activEmail, problem is the cost for me, as I'm not normally one to write alot of code, esp for mail aplications so the cost (actually any Cost) is prohibitive! The telnet way is basicly what I'm doing with WinBatch, man is it slow and clunky, thanks for the effort, I'll keep digging around... I was really hopping for some kind of windows built in calls I could utilize, I do that alot in my login scripts using WMI calls and such! "TDM" <rpuffd@xxxxxx> wrote in message news:e10qElTGJHA.4200@xxxxxx Quote: > > "Alan Fisher" <alan@xxxxxx> wrote in message > news:91F008A9-8416-4C4B-BD2C-DA4BF109FFA8@xxxxxx Quote: >> Is there any built in way to check a POP3 or IMAP4 server for e-mail, and >> download a message form said server? >> >> I have written some scripts with WinBatch, but would like to move it to >> VB I just can't find anyway to Poll the server, and download the message. >> My current code checks the POP3 Server for a message, then downloads the >> Oldest message, and then Parses it (the parsing is the reason for the >> whole script) after Parsing, I then log back to the server, and delete >> the e-mail, while this is VERY doable in WB, it's slow and hard to >> automate the execution of the WB Script automatically. If I could do the >> same in VB I could use the Built-in Scheduler in windows to run the >> script (I can't do that with WB because it needs an interpreter which I >> can't afford, windows has a Built in VB interpreter >> > 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. > > It is possible in VB, I once wrote an app in VB to do this. > > If you are OK with using third party tools, you might have a look > here : http://www.activexperts.com/ActivEmail/ > > > TDM |
My System Specs![]() |
| | #5 (permalink) |
| | Re: Check Pop3 or IMAP4 "Alan Fisher" <alan@xxxxxx> wrote in message news:%23fnd2NSIJHA.1556@xxxxxx Quote: >I had looked at the activEmail, problem is the cost for me, as I'm not > normally one to write alot of code, esp for mail aplications so the cost > (actually any Cost) is prohibitive! The telnet way is basicly what I'm did not see the cost associate with this, and if I did, I would not have posted. TDM |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| IMAP4.log Does it still get created? Where does it go? | Live Mail | |||
| WLM & IMAP4: messages are not available on the server | Live Mail | |||
| Inbox folder does not show in IMAP4 account | Vista mail | |||
| How do I check my POP3 and SMTP? | Vista mail | |||
| Newbie: Nagios with nrpe_nt, check for diskspace; check services,returncode | PowerShell | |||