Retrieve internet Email??

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
RunelurenavnAsked:
Who is Participating?
 
Eddie ShipmanConnect With a Mentor All-around developerCommented:
alot of correct stuff for what the OP wanted, to.
I guess that's how you get the points. ;-)
0
 
RunelurenavnAuthor Commented:
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
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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.

 
Eddie ShipmanAll-around developerCommented:
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
 
Eddie ShipmanAll-around developerCommented:
I am also writing a custom component that encapsulates the article code.
0
 
RunelurenavnAuthor Commented:
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
 
sftwengCommented:
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
 
sftwengCommented:
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
 
RunelurenavnAuthor Commented:
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
 
sftwengCommented:
I'm guessing a little here because I hace Delphi 6 Enterprise on this machine - you probably need to remove IXMLDocument from dclnet70
0
 
sftwengCommented:
Yes, I just confirmed dclnet70 on another machine with Delphi 7 Professional.
0
 
sftwengCommented:
See "Installing Component Packages" in Delphi Help.
0
 
Eddie ShipmanAll-around developerCommented:
NO, all you have to do is place mshtml in your uses, you don't need to import the type lib.
0
 
Eddie ShipmanAll-around developerCommented:
Man, I must be going blind. Let me rephrase that...
0
 
Eddie ShipmanAll-around developerCommented:
I don't have a version with TXMLDocumetn here at work. I do at home and can get you the answer later today.
0
 
RunelurenavnAuthor Commented:
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
 
Eddie ShipmanAll-around developerCommented:
I only have D6 Pro here without TXMLDocument so I can't tell you right now.
0
 
Eddie ShipmanAll-around developerCommented:
Have you tried renaming TXMLDocument in the Import Window to TMyXMLDocument?
You won't be using it anyway in the sample code.
0
 
RunelurenavnAuthor Commented:
Great that works! Thanks, now I can finally get on with the implementation :)
0
 
Eddie ShipmanAll-around developerCommented:
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
 
RunelurenavnAuthor Commented:
Thanks, if you have the source that would be a great help for me :)
0
 
Eddie ShipmanAll-around developerCommented:
email me at mr_delphi_developer at yahoo dot com
0
 
Eddie ShipmanAll-around developerCommented:
Runelurenavn,
  Was the code helpful? Ned more help?
0
 
SaLzCommented:
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
 
Eddie ShipmanAll-around developerCommented:
Salz, no need to reply, the OP didn't want smtp access to email. He wanted access to HOTMAIL.
0
 
RunelurenavnAuthor Commented:

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
 
Eddie ShipmanAll-around developerCommented:
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
 
Eddie ShipmanAll-around developerCommented:
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
 
RunelurenavnAuthor Commented:
Yes I AM using hotmail from outside the us. Norway to be more specific.....Does that change anything though?
0
 
Eddie ShipmanAll-around developerCommented:
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
 
RunelurenavnAuthor Commented:
Ok, have created an account. Here's the details:
username: runelurenavn@hotmail.com
Password: 123456
0
 
Eddie ShipmanAll-around developerCommented:
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
 
Eddie ShipmanAll-around developerCommented:
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
 
Eddie ShipmanAll-around developerCommented:
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
 
DragonSlayerCommented:
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
 
SaLzCommented:
shame
0
 
Eddie ShipmanAll-around developerCommented:
Like I said...MONEY HUNGRY FOOLS!
0
 
Eddie ShipmanAll-around developerCommented:
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
 
sftwengCommented:
EddieShipman deserves the points
0
 
SaLzCommented:
ye, seems he posted quite allot lol
0
 
RunelurenavnAuthor Commented:
Sorry, I forgot it! Eddie Shipman most certainly deserve all the points. I am very grateful for all his invaluable help.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.