INDODELPHI

Blog’s Tutorial Delphi – Reference from Onez Delphi Explorer

ACCESSING HOTMAIL FROM DELPHI

// ******************************************************************
// ACCESSING HOTMAIL FROM DELPHI
// Category        : E-Mail, News
// Author          : DelphiFAQ.com
// Author Email    : tips@delphifaq.com
// Author Web      : http://www.delphifaq.com
// Tips Website    : Delphi FAQ
// Tips Website URL: http://www.delphifaq.com
// ******************************************************************

{
Q:
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.

A:
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:
}

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.

October 28, 2007 Posted by maulaku | Email | | No Comments Yet