Solved

I need a code which fetches the new mails

Posted on 1998-10-26
3
150 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
  • 2
3 Comments
 
LVL 1

Accepted Solution

by:
timberbt earned 100 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

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Question has a verified solution.

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

Check out this infographic on what you need to make a good email signature that will work perfectly for your organization.
Large Outlook files lead to various unwanted errors and corruption issues. Furthermore, large outlook files can also make Outlook take longer to start-up, search, navigate, and shut-down. So, In this article, i will discuss a method to make your Out…
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 …
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

895 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now