?
Solved

I need a code which fetches the new mails

Posted on 1998-10-26
3
Medium Priority
?
159 Views
Last Modified: 2010-05-18
I would like to make a prog. which forwards the new mails automatically to an other prog. How can I fetch the new mails ???
0
Comment
Question by:kapitany
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 1

Accepted Solution

by:
timberbt earned 200 total points
ID: 1621840
I assume you are logging into a POP3 mail server?  You first to attach via Telnet to port 110.  Then send "User <usernamehere>" <ENTER> "pass <passwordhere>" Enter then you use the list command to show you how many emails you have.  You parse through that and find the highest number (i.e. 9 or 15) then use the "retr <messagenumberhere>" command to view the messages and the "dele <messagenumberhere>" to delete them when you are done.  Retr will simply print them to the screen so you capture that and send it where you wish or modify it how you wish.
0
 

Author Comment

by:kapitany
ID: 1621841
Yep, it works fine. The problem is while I'm logged in the POP3 is kept locked so no other mail program can read form there. Outlook is checking this account every 1 minute. My problem is that I would like to have the email in two places. One is the forwarded place and one is the outlook. But if I keep locked the POP3 outlook can't download the email, and if I relese the lock I cant catch my mail. Do you have any idea how I can have both? It would be a possibility to forward the mail to two different place. One where outlook can download and an other where I can later forward, but how is it possible?? Any other idea is wellcomed !  Also a simple code would be nice to see how these POP3 login and checking works...
0
 
LVL 1

Expert Comment

by:timberbt
ID: 1621842
Well I guess that depends on the pop3 server...but you're going to hit problems running from the same account if your Outlook is deleting mail off the server than too.  That'd mean everytime it retrieves one, it deletes it.  So that wouldn't be any good anyways, you can try making a rule in outlook to forward everything to another account that you would use the other program for.  Otherwise, you're going to end up trying to cooridinate timing procedures between outlook and your program, and you'd have to have outlook keep messages on the server, and your program would be forced to make decisions as to whether it already had the mail that was out there.   It makes life a lot more difficult in other words.
But in outlook you can just tell it to forward "All mail directly to me" and forward that to some other account.  You'll have to use the rules wizard for that, it doesn't have a canned one, but it's real easy to do.  That way if you really wanted, you could also just filter stuff.  *BUT* this means that you getting mail to the other account is dependant on your outlook being up and running, which isn't neccesarily good.  You may want to check with whoever runs the POP server, I know some have the capability to forward copies of one message to others.  I know some used that as a form of a distribution list like a listserv.  You email to 1 address and multiple people get it.  
Probably not the answers you were looking for...but....:) Do what you gotta do eh?  
0

Featured Post

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will help to fix the below error for MS Exchange server 2010 I. Out Of office not working II. Certificate error "name on the security certificate is invalid or does not match the name of the site" III. Make Internal URLs and External…
In this article I discuss my selections of the Top Four free Outlook OST File Viewers available. Open, view and read even damaged OST files by using these tools. They all provide a clear preview of all data such as emails, notes, tasks, calendars, e…
This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …
CodeTwo Sync for iCloud (http://www.codetwo.com/sync-for-icloud?sts=6554) automatically synchronizes your Outlook 2016, 2013, 2010 or 2007 folders with iCloud folders available via iCloud Control Panel. This lets you automatically sync them with…
Suggested Courses

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question