65.9K
CodeProject is changing. Read more.
Home

eMailCheck

starIcon
emptyStarIcon
starIcon
emptyStarIconemptyStarIconemptyStarIcon

1.44/5 (9 votes)

Aug 1, 2005

viewsIcon

28250

downloadIcon

353

This articles illustrates CheckMail which is a C++ class to extract a list of email addresses found on a local computer, using the registry.

Introduction

CheckMail is a C++ class to extract a list of email addresses found on a local computer using the registry. It tries to enumerate all subkeys of the registry key: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\UnreadMail.

How to use it

Include "CheckMail.h" in the file where you want to use this class, or include it in your "AppDlg.h" file, for example. Then, declare an object of CCheckMail class, named "mail" here.

You are now ready to use the "mail" object :-)

Example in a "for" loop:

for(int i=0; i<mail.m_mail.GetCount(); i++)
{
    printf("#%i: %s\n",i+1,mail.m_mail[i]);
}

That's all.

Restrictions

Tested on Windows XP SP1 and Windows 2003 with Outlook Express and Thunderbird. It seems to fail with "Incredimail". For others, I don't know, sorry.