K
Kumar
Hello all,
I am writing a COM Add-In program in MSVC++ to move spam messages to
spam folder. The program has to check message body for specific words
and move it to folder when the new mail arrives in outlook. My problem
is how to get mailitem of new message in OnNewMail method when it
arrives. My code sample is as following.
_ATL_FUNC_INFO OnNewMailInfo = {CC_STDCALL, VT_EMPTY, 0 };
void __stdcall OnNewMail( );
BEGIN_SINK_MAP(CApplication)
SINK_ENTRY_INFO(1, __uuidof(Outlook::ApplicationEvents), 0xf003,
OnNewMail, &OnNewMailInfo)
END_SINK_MAP()
void __stdcall CApplication::OnNewMail( )
{
//
// get mail item here
// check mail body for specific words
// move it to spam folder
//
}
Please help.
Thank You,
Kumar
I am writing a COM Add-In program in MSVC++ to move spam messages to
spam folder. The program has to check message body for specific words
and move it to folder when the new mail arrives in outlook. My problem
is how to get mailitem of new message in OnNewMail method when it
arrives. My code sample is as following.
_ATL_FUNC_INFO OnNewMailInfo = {CC_STDCALL, VT_EMPTY, 0 };
void __stdcall OnNewMail( );
BEGIN_SINK_MAP(CApplication)
SINK_ENTRY_INFO(1, __uuidof(Outlook::ApplicationEvents), 0xf003,
OnNewMail, &OnNewMailInfo)
END_SINK_MAP()
void __stdcall CApplication::OnNewMail( )
{
//
// get mail item here
// check mail body for specific words
// move it to spam folder
//
}
Please help.
Thank You,
Kumar