Mega Code Archive

 
Categories / Delphi / LAN Web TCP
 

Accessing hotmail from delphi

Question: Is it possible to access a hotmail account through the POP3 and SMTP? I know its a web frontend but I'd like to write a automated application which can send and recieve mail using a Hotmail account. Answer: Hotmail isn't accessable 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: Thanks to Sylvestro Lorello for a correction in the source code. program dummy; uses ShellAPI; 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.