[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

I need a code which fetches the new mails

Posted on 1998-10-26
3
Medium Priority
?
164 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 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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Changing a few Outlook Options can help keep you organized!
With so many activities to perform, Exchange administrators are always busy in organizations. If everything, including Exchange Servers, Outlook clients, and Office 365 accounts work without any issues, they can sit and relax. But unfortunately, it…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Suggested Courses

873 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