ASP VBScript Email question
September 17, 2007 6:12 PM   Subscribe

How can I do a simple logon to a POP3 account using ASP/VBScript?

I just need to logon to an email account IMAP or POP3 (hosted on my network) given a username and password and then exit the session. How would I accomplish this in ASP/VBScript? I've tried creating a WScript object and running telnet from within that, but it is not having the same effect as it does in the command window, and it seems like there is a better solution anyhow (but maybe not?). Google is not helping by returning the countless email components out there that I feel are overkill for this simple task. Thanks in advance!
posted by gatorbiddy to Computers & Internet (6 answers total)
 
There is no way to do this for free. You need to either write your own server side object to do this, or check with your hosting provider to see if they already provide one.

If you have access to the web server you could look into some of the non-free alternatives. This site has a fairly decent breakdown of the options available.
posted by purephase at 6:25 PM on September 17, 2007


Hmm, I do have access to all servers. I think using WSH to go into telnet is a way to do it, but maybe I just have my syntax wrong. Thanks for the link, though I hold out hope that this is possible without a component.
posted by gatorbiddy at 6:44 PM on September 17, 2007


I was just about to suggest CDO, but then I read purephase's link.

You could probably do this by scripting Outlook with Automation, but that is kind of ridiculously heavy weight. I'd probably go with your telnet idea.
posted by zixyer at 7:20 PM on September 17, 2007


Piping the commands through to telnet and then closing the session will be tricky. You might looking at writing out a batch file that takes a few passed arguments that are used when establishing the telnet session. Catching the output from the session will require piping the contents of the batch file to a log file and then scraping it for specific content (if you need to even do this).

The WSH shell object is fairly limited but you could munge it with SendKeys to try to do it all through VBScript (without the batch file) but capturing the output will be impossible.
posted by purephase at 7:58 PM on September 17, 2007


You might try looking at writing...
posted by purephase at 7:59 PM on September 17, 2007


Thanks for the SendKeys link, that's what I was attempting to use in my telnet attempt.

Not really worth writing a whole email object at this point as this is just to address a 10 second issue in a different longer problem.
posted by gatorbiddy at 8:39 PM on September 17, 2007


« Older It was here just last week...   |   Pen name paranoia Newer »
This thread is closed to new comments.