Statica
01-07-2003, 09:41 AM
As with my post about how to <A HREF="http://forum.pcmech.com/showthread.php?s=&postid=354221#post354221" TARGET="_new">FTP from a command prompt in Windows</A> I just thought that perhaps this might come in handy as well.
This works especially well in situations where say you are visitting someplace and need to run a quick check, and your ISP doesnt have a decent webmail application. Or even if the webmail is too slow... or checking home mails from work and vice versa; this is especially useful if you have this shamelessly large attachment on your mail server and you just want to get rid of it without your email program trying to download it. Or you have this nasty suspicion that there is a virus in one of the mails, and your wonderful Microsoft supplied email program is too dumb to show you any attachments; or the best yet, you want to check the mail headers of the incoming mail beyond which your mail program or your webmail program will allow you to do so comfortably, to track out who is spamming you etc. Or if you are in a different part of the world and your mail server seems to be connected with a 2400 bps modem, this will speed up your mail checking experience.
This is essentially how email programs work, and these commands will let you talk to pretty much most versions of POP3 and IMAP servers.
To start:
1) You essentially need a basic telnet program. In Win9x; there is an obscure telnet program in the win directory; while win2k and XP users can use the Command Prompt and use the telnet program there.
<i>note:</i> by default, in the windows telnet program, esp in Win9x has local echo turned OFF. If you cannot see whatever you type (and you want to), click on OPTIONS and turn on Local Echo. For Win2k/XP users of the CLI, you can type <b>set localecho</b> in the telnet prompt to turn on that option.
2) You need to remember your mail server address (in this case I will use - mailserver.pcmech.com)
3) your user account name (that is stored in your mail program), i'll use <b>statica</b> as an example
4) your userpassword .. for now, i'll use <b>myemail</b>
5) this is a fairly important step, some ISP's and admins especially in a corporate environ. like to change the server ports around a bit. The standard POP port is set at 110, if your server has an alternate port substitute it in place of the 110 and the rest is the same.
These are just a few <b>basic</b> commands to get you started, you can obtain more information by reading the RFC documents for POP servers or checking the documentation of the mail server implementation of your ISP (ok thats a bit far fetched) but these should be more than required for now.
I mean the ability to check your mail by learning about 4 commands is a rather powerful tool.
Also, the server responses will differ based on the configuration of the various ISP's etc, but it essentially is the same format.
As I said, you dont need to carry around a telnet program with you wherever you go, they are on pretty much every OS out there .. even if the OS has a browser installed; with more complex telnet programs you can automate scripts and have a more comfortable UI (the telnet program in Win9x is just awful, but remember this is the survival guide)
syntax used:
commands you type are in <b>bold</b> a line break after whatever you typed automatically means that you hit the enter key
any explanations are in <i>italics</i>
what you should see on your screen (server responses) are in red
This works especially well in situations where say you are visitting someplace and need to run a quick check, and your ISP doesnt have a decent webmail application. Or even if the webmail is too slow... or checking home mails from work and vice versa; this is especially useful if you have this shamelessly large attachment on your mail server and you just want to get rid of it without your email program trying to download it. Or you have this nasty suspicion that there is a virus in one of the mails, and your wonderful Microsoft supplied email program is too dumb to show you any attachments; or the best yet, you want to check the mail headers of the incoming mail beyond which your mail program or your webmail program will allow you to do so comfortably, to track out who is spamming you etc. Or if you are in a different part of the world and your mail server seems to be connected with a 2400 bps modem, this will speed up your mail checking experience.
This is essentially how email programs work, and these commands will let you talk to pretty much most versions of POP3 and IMAP servers.
To start:
1) You essentially need a basic telnet program. In Win9x; there is an obscure telnet program in the win directory; while win2k and XP users can use the Command Prompt and use the telnet program there.
<i>note:</i> by default, in the windows telnet program, esp in Win9x has local echo turned OFF. If you cannot see whatever you type (and you want to), click on OPTIONS and turn on Local Echo. For Win2k/XP users of the CLI, you can type <b>set localecho</b> in the telnet prompt to turn on that option.
2) You need to remember your mail server address (in this case I will use - mailserver.pcmech.com)
3) your user account name (that is stored in your mail program), i'll use <b>statica</b> as an example
4) your userpassword .. for now, i'll use <b>myemail</b>
5) this is a fairly important step, some ISP's and admins especially in a corporate environ. like to change the server ports around a bit. The standard POP port is set at 110, if your server has an alternate port substitute it in place of the 110 and the rest is the same.
These are just a few <b>basic</b> commands to get you started, you can obtain more information by reading the RFC documents for POP servers or checking the documentation of the mail server implementation of your ISP (ok thats a bit far fetched) but these should be more than required for now.
I mean the ability to check your mail by learning about 4 commands is a rather powerful tool.
Also, the server responses will differ based on the configuration of the various ISP's etc, but it essentially is the same format.
As I said, you dont need to carry around a telnet program with you wherever you go, they are on pretty much every OS out there .. even if the OS has a browser installed; with more complex telnet programs you can automate scripts and have a more comfortable UI (the telnet program in Win9x is just awful, but remember this is the survival guide)
syntax used:
commands you type are in <b>bold</b> a line break after whatever you typed automatically means that you hit the enter key
any explanations are in <i>italics</i>
what you should see on your screen (server responses) are in red