Solved

Retrieve internet Email??

Posted on 2004-09-21
42
292 Views
Last Modified: 2010-04-16
Hi, I have a very straightforward questions, but I am not certain that the solution to the prblem is all that simple..
I am wondering how I can fetch eg. mail from an hotmail account in to the email client program I have built?? Is this possible at all without relying on third party software?
I have been stuck on this for a while so all help will be greately appreciated :)
R
0
Comment
Question by:Runelurenavn
[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
  • 20
  • 10
  • 7
  • +2
42 Comments
 
LVL 7

Expert Comment

by:sftweng
ID: 12113889
0
 

Author Comment

by:Runelurenavn
ID: 12121911
Have looked at it now and will try to implement it. Have to say it seems complex!
What if I want to get access to yahoo mail or perhaps even the new google mail? Do I need this kind of "specific" code as for hotmail?
Thanks for help so far!
R
0
 
LVL 26

Expert Comment

by:EddieShipman
ID: 12123140
If you need help with it, le me know. I wrote the article. This code is specific to Hotmail.

I have been meaning to, just not enough time in a day...
1. convert to use sockets instead of XMLHTTP
2. write a clone of YahooPop which basically does the same thing but for Yahoo.
3. Write one for GMail when I figure out how it works. I have a GMail account but have not done any sniffing, yet.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 26

Expert Comment

by:EddieShipman
ID: 12123147
I am also writing a custom component that encapsulates the article code.
0
 

Author Comment

by:Runelurenavn
ID: 12131247
Thanks for helping out  :)

Here's my 1st problem: When I try to install the typelibrary I get an error message saying "A class named TXMLDocument is already installed". The problem is that I dont know where/what to uninstall to make this work. I have played around with this for a while already - trying out all sorts of things,but with no luck..
R
0
 
LVL 7

Expert Comment

by:sftweng
ID: 12131309
Is it the Microsoft XML Typelibrary that you're trying to install? What version and level of Delphi are you working with, Delphi 6 Enterprise?
0
 
LVL 7

Expert Comment

by:sftweng
ID: 12131317
If it's already installed, you might just bele to start using it, otherwise you should use the Components file menu to remove it.
0
 

Author Comment

by:Runelurenavn
ID: 12131536
Yes, I'm trying to install msxml2 /msxml3  on Delphi7 enterprise but I keep getting this error message "A class named TXMLDocument is already installed". I i initially thought that this meant msxml2/3 was installed, but I am almost certain it is only msxml1 that is already installed. This because when I add the typelibrary to my uses clause only mstypelibrary1 does not give an error message. When typelibrary1 IS included I get an error: TXMLHTTP is not recognised by the compiler. I assume this is due to an old version of the typelibrary being installed??
I just tried to remove the component TXMLDocument from the internet component tab, but it does not appear to have made any difference...
R
0
 
LVL 7

Expert Comment

by:sftweng
ID: 12131848
I'm guessing a little here because I hace Delphi 6 Enterprise on this machine - you probably need to remove IXMLDocument from dclnet70
0
 
LVL 7

Expert Comment

by:sftweng
ID: 12131855
Yes, I just confirmed dclnet70 on another machine with Delphi 7 Professional.
0
 
LVL 7

Expert Comment

by:sftweng
ID: 12131874
See "Installing Component Packages" in Delphi Help.
0
 
LVL 26

Expert Comment

by:EddieShipman
ID: 12132947
NO, all you have to do is place mshtml in your uses, you don't need to import the type lib.
0
 
LVL 26

Expert Comment

by:EddieShipman
ID: 12132962
Man, I must be going blind. Let me rephrase that...
0
 
LVL 26

Expert Comment

by:EddieShipman
ID: 12132973
I don't have a version with TXMLDocumetn here at work. I do at home and can get you the answer later today.
0
 

Author Comment

by:Runelurenavn
ID: 12134561
I have tried to remove dcinet70's IXMLDocument but Delphi refuses me to access it in edit mode....
Here's what I did: Components\Install packages and then I selected the package to edit, but the edit button is still disabled! Have also tried to reimport the typelibrary and then just remove the offending class from the list, but it is (offcourse) not editable. How did you manage to remove the IXMLDocument??

Also added the mshtml to my uses clause but still got the error mesage "Undeclared identifier TXMLHTTP"..
0
 
LVL 26

Expert Comment

by:EddieShipman
ID: 12135264
I only have D6 Pro here without TXMLDocument so I can't tell you right now.
0
 
LVL 26

Expert Comment

by:EddieShipman
ID: 12135299
Have you tried renaming TXMLDocument in the Import Window to TMyXMLDocument?
You won't be using it anyway in the sample code.
0
 

Author Comment

by:Runelurenavn
ID: 12158810
Great that works! Thanks, now I can finally get on with the implementation :)
0
 
LVL 26

Expert Comment

by:EddieShipman
ID: 12279662
Also...

Although I don't have a subscription, Delphi Informant had an article by Alfred Mirzagitov
in I think December, about creating a POP3 proxy that accessed Hotmail just like my
article does as a client. I have the source from the article if you need it.

Part One:
http://www.delphizine.com/features/2004/01/di200401am_f/di200401am_f.asp
Part Two:
http://www.delphizine.com/features/2004/02/di200402am_f/di200402am_f.asp
0
 

Author Comment

by:Runelurenavn
ID: 12284420
Thanks, if you have the source that would be a great help for me :)
0
 
LVL 26

Expert Comment

by:EddieShipman
ID: 12286620
email me at mr_delphi_developer at yahoo dot com
0
 
LVL 26

Expert Comment

by:EddieShipman
ID: 12468478
Runelurenavn,
  Was the code helpful? Ned more help?
0
 
LVL 2

Expert Comment

by:SaLz
ID: 12708997
ok there are lots of demos with source cod in these links.

32 delphi indy demos are in here, check out the MAIL CLIENT in there.
http://www.indyproject.org/indy/demodownloads/Indy9Demos_26Oct04.zip

some more delphi source codes.
http://www.atozed.com/indy/Demos/Indy9.iwp
0
 
LVL 26

Expert Comment

by:EddieShipman
ID: 12710222
Salz, no need to reply, the OP didn't want smtp access to email. He wanted access to HOTMAIL.
0
 

Author Comment

by:Runelurenavn
ID: 12715304

Hi, I have used the sample code to try and get this hotmail thing going. So far I can access the server and log on, but I cannot seem to retrieve the messages. When I click the ‘inbox’ in the ttreenode, nothing happens. I have tried debugging, and I find that the nodeList (oNodeList) is not getting populated, so the for loop is always skipped, and no data is loaded.. The oNodeList lenght is zero when I check.. Have you got any idea what is wrong? Everything seems to be ok up to this point...

Here is the code that seems to cause problems. It's from the ParseMailboxInfo procedure:

oNodelist := oXMLDoc.selectNodes('//D:response');
  mNodeList := oXMLDoc.selectNodes('//D:prop');
  for i := 0 to oNodelist.length -1 do
  begin
    mInfo           := TMailInfo.Create;
    oMsgNode        := oNodelist.item[i];
    mInfo.Url       := oMsgNode.childNodes[0].text;
    mInfo.Subject   := mNodeList.Item[i].selectNodes('//m:subject').Item[i].text;

regards, R
0
 
LVL 26

Expert Comment

by:EddieShipman
ID: 12715807
I will take alook at it to see if Hotmail's changes are causeing the problem.
What I usually do is anytime I load the XML, I also save it to a file and examine
the file to see what it is returning.

I also use OE to check its results against what I'm getting with my program.
There are instructions to do that in the first part of the article.
0
 
LVL 26

Expert Comment

by:EddieShipman
ID: 12718415
Can you post your ResponseText? I just ran it and it worked flawlessly on both my accounts.

Although I have a previously unknown bug where you click on the root node of the tree.
I did not catch that one. I should not try to get any messages if the root node is clicked.
Now it just hangs when you click on the root node.

Also, are you trying Hotmail in a different country (than US)?
0
 

Author Comment

by:Runelurenavn
ID: 12731308
Yes I AM using hotmail from outside the us. Norway to be more specific.....Does that change anything though?
0
 
LVL 26

Expert Comment

by:EddieShipman
ID: 12731347
It is possible that the Unicode chars are causing problems in the XML.

Could you create a Norwegian HM account for me to test with and send me the link
to get to it?
0
 

Author Comment

by:Runelurenavn
ID: 12733851
Ok, have created an account. Here's the details:
username: runelurenavn@hotmail.com
Password: 123456
0
 
LVL 26

Expert Comment

by:EddieShipman
ID: 12737091
Tried it and got a "998 No extra explanation" error. ???
Place a brekpoint on the line where you are first getting the
FHotmailError in the Connect procedure.
See if the line
FHotmailError :=
       oXMLHTTP.getResponseHeader('X-Dav-Error');

returns '998 no extra eaplanation'

Can't use OE because HM now requires subscription
to access from OE or Outlook; the money hungry fools!

0
 
LVL 26

Expert Comment

by:EddieShipman
ID: 12737165
Well, I looked at my HTTPMail.og file, that OE modifies when accessing HM and this is the last entry:

HTTPMAIL: 09:00:33 [rx]
HTTP/1.1 402 Access to Hotmail via Outlook and Outlook Express now requires a subscription. Please sign up at http://upgrade.msn.com
Connection: close
Date: Fri, 03 Dec 2004 15:00:32 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
P3P:CP="BUS CUR CONo FIN IVDo ONL OUR PHY SAMo TELo"
Set-Cookie: HMSatchmo=0;  domain=.hotmail.com; path=/
Set-Cookie: HMMS2954=7FECB06078A504C3483A4E6567FC22F4C0A5CEB799EF84A4CDD95CFB60D46D90;  domain=.hotmail.com; path=/
Cache-Control: private
Content-Type: text/html
X-Dav-Error: 998 No extra explanation
HMServer: H: BAY16-DAV10.phx.gbl  V: WIN2K3 10.00.1121.0073 i  D: Nov 21 2004 22:36:11 S: 0

See the HTTP 402 error message and the X-Dav-Error?

When you connect via OE, do you get the same message:
"Access to Hotmail via Outlook and Outlook Express now requires a subscription. Please sign up at http://upgrade.msn.com"

What is the name of the server that OE tries to connect to?
Should be in a line in your HTTPMail.log file that looks like this:
"PROPFIND http://services.msn.com/svcs/hotmail/httpmail.asp"
0
 
LVL 26

Expert Comment

by:EddieShipman
ID: 12740632
You know, I'm beginning to think that MS allows users of older accounts to access Hotmail through WebDAV, like in my program.
I am able to access my three accounts, just fine. The one you just now created, no access.

When did you create your account?
0
 
LVL 14

Expert Comment

by:DragonSlayer
ID: 12745018
Seems that all new Hotmail accounts will not have WebDAV access enabled. And as for existing users who have accessed their accounts via WebDAV before October 2004 (not sure about the exact date, could be mistaken), they will be able to continue using WebDAV until April 2005.

Read more about it here http://tinyurl.com/4cts5

For new Hotmail users or those that never accessed their account via WebDAV before, you would need to subscribe to MSN (http://upgrade.msn.com) to be able to continue WebDAV access for your account.
0
 
LVL 2

Expert Comment

by:SaLz
ID: 12746606
shame
0
 
LVL 26

Expert Comment

by:EddieShipman
ID: 12754220
Like I said...MONEY HUNGRY FOOLS!
0
 
LVL 26

Expert Comment

by:EddieShipman
ID: 13077167
So, Runelurenavn, did you decide to get Hotmail Plus? Does it work for you if you did?
Are you going to close out this question?
0
 
LVL 7

Expert Comment

by:sftweng
ID: 13345441
EddieShipman deserves the points
0
 
LVL 2

Expert Comment

by:SaLz
ID: 13345994
ye, seems he posted quite allot lol
0
 
LVL 26

Accepted Solution

by:
EddieShipman earned 500 total points
ID: 13346054
alot of correct stuff for what the OP wanted, to.
I guess that's how you get the points. ;-)
0
 

Author Comment

by:Runelurenavn
ID: 13347108
Sorry, I forgot it! Eddie Shipman most certainly deserve all the points. I am very grateful for all his invaluable help.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to debug For loops? 3 74
Multi-layered image in FireMonkey 9 93
Firemonkey Tcameracomponent resultion 1 48
Using MMsystem To change audio input 1 40
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

751 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