Mirror

Accessing HotMail from Delphi (Views: 100)


Problem/Question/Abstract:

Is it possible to access a HotMail account through the POP3 and SMTP? I know its a web front end but I'd like to write a automated application which can send and receive mail using a HotMail account.

Answer:

HotMail is not accessible through POP/SMTP. you must use their web interface.

There is no possible shortcut to read mail but you can open the default HotMail account in new message mode using this ShellExecute call:


program dummy;

var
  ToAddress: string;
  EightSpaces: string;

begin
  ToAddress := 'john@pacbell.net';
  // Don't know why but this is required to get the
  // correct compose address...
  EightSpaces := '        ';
  ShellExecute(Handle, PChar('open'), PChar('rundll32.exe'),
    PChar('C:\PROGRA~1\INTERN~1\HMMAPI.DLL,MailToProtocolHandler'
    + EightSpaces + ToAddress), nil, SW_NORMAL)
end.

<< Back to main page