Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Exchange
2000.active.directory
2000.admin
2000.announcements
2000.app.conversion
2000.applications
2000.clients
2000.clustering
2000.connectivity
2000.development
2000.documentation
2000.general
2000.information.store
2000.interop
2000.kms
2000.misc
2000.protocols
2000.realtime.collabo.
2000.setup
2000.transport
2000.win2000
admin
application.conversion
applications
clients
clustering
connectivity
design
development
misc
mobility
setup
tools
  
 
date: Mon, 14 Apr 2008 04:39:00 -0700,    group: microsoft.public.exchange.development        back       


Unable to receive notifications in outlook 2007   
I am not able to get notifications for IMAPIAdviseSink:: OnNotify method when 
a mail is sent from a outlook 2007 profile having cached mode/ POP 3 account 
enabled. Please do let me know as to why I am facing this problem and what is 
the workaround for the same
date: Mon, 14 Apr 2008 04:39:00 -0700   author:   kavitha

Re: Unable to receive notifications in outlook 2007   
Hi kavitha,

> I am not able to get notifications for IMAPIAdviseSink:: OnNotify
> method when a mail is sent from a outlook 2007 profile having cached
> mode/ POP 3 account enabled. Please do let me know as to why I am
> facing this problem and what is the workaround for the same

POP3 servers won't push a notify, only Exchange Server.
If you have both POP3 and Exchange Server, is Exchange Server your
default mailbox?
You may need to open your firewall for Outlook to receive new mail
notifications from Exchange.

--
SvenC
date: Mon, 14 Apr 2008 13:51:39 +0200   author:   SvenC am

Re: Unable to receive notifications in outlook 2007   
I am not receiving notifications from outlook message store on COM 
interfaces. In outlook 2003 I am able to receive notifications when the 
outlook profile is in cached mode. But in outlook 2007, I am not able to  
connect to sinks and hence unable to receive the notification. Could you 
please tell me why is outlook 2007 behaving wierdly when cached mode/POP 3 
account enbled with it

"SvenC" wrote:

> Hi kavitha,
> 
> > I am not able to get notifications for IMAPIAdviseSink:: OnNotify
> > method when a mail is sent from a outlook 2007 profile having cached
> > mode/ POP 3 account enabled. Please do let me know as to why I am
> > facing this problem and what is the workaround for the same
> 
> POP3 servers won't push a notify, only Exchange Server.
> If you have both POP3 and Exchange Server, is Exchange Server your
> default mailbox?
> You may need to open your firewall for Outlook to receive new mail
> notifications from Exchange.
> 
> --
> SvenC
>
date: Mon, 14 Apr 2008 05:31:01 -0700   author:   kavitha

Re: Unable to receive notifications in outlook 2007   
Hi kavitha,

> I am not receiving notifications from outlook message store on COM
> interfaces. In outlook 2003 I am able to receive notifications when
> the outlook profile is in cached mode. But in outlook 2007, I am not
> able to connect to sinks and hence unable to receive the
> notification. Could you please tell me why is outlook 2007 behaving
> wierdly when cached mode/POP 3 account enbled with it

I have no troubles with Outlook 2007 in cached mode accessing only
an Exchange Server. Could you remove the POP3 account and see if
it starts working without POP3 account?

Also note that after your call to Advise you need to make any other
MAPI call to the server to initiate the notification system. A typical
solution is to call GetRowCount on the table you called Advise on.
But that didn't change with OL2007, that is with every MAPI version.

And again: are your Firewall settings identical on the machine with
OL2003 compared to OL2007?

--
SvenC
date: Mon, 14 Apr 2008 14:42:43 +0200   author:   SvenC am

Re: Unable to receive notifications in outlook 2007   
The notifications go in when the POP 3 account is removed. Can you please let 
me know as to why the notifications are not sent with POP 3 enabled? Also 
when the POP 3 account is disabled and the profile still continues with 
cached mode, the notifications are not sent. When the csached mode is 
disabled, I start receving the notications. So there is still some problem 
with cached mode. 

"SvenC" wrote:

> Hi kavitha,
> 
> > I am not receiving notifications from outlook message store on COM
> > interfaces. In outlook 2003 I am able to receive notifications when
> > the outlook profile is in cached mode. But in outlook 2007, I am not
> > able to connect to sinks and hence unable to receive the
> > notification. Could you please tell me why is outlook 2007 behaving
> > wierdly when cached mode/POP 3 account enbled with it
> 
> I have no troubles with Outlook 2007 in cached mode accessing only
> an Exchange Server. Could you remove the POP3 account and see if
> it starts working without POP3 account?
> 
> Also note that after your call to Advise you need to make any other
> MAPI call to the server to initiate the notification system. A typical
> solution is to call GetRowCount on the table you called Advise on.
> But that didn't change with OL2007, that is with every MAPI version.
> 
> And again: are your Firewall settings identical on the machine with
> OL2003 compared to OL2007?
> 
> --
> SvenC
>
date: Mon, 14 Apr 2008 05:52:01 -0700   author:   kavitha

Re: Unable to receive notifications in outlook 2007   
Hi kavitha,

> The notifications go in when the POP 3 account is removed. Can you
> please let me know as to why the notifications are not sent with POP
> 3 enabled? Also when the POP 3 account is disabled and the profile
> still continues with cached mode, the notifications are not sent.
> When the csached mode is disabled, I start receving the notications.
> So there is still some problem with cached mode.

Please show the code you use to set up the notification system.

I never used POP3, so I have no experience how this affects the
notification engine. I would expect notifications to fail if you set the
POP3 account as default account.

--
SvenC
date: Mon, 14 Apr 2008 16:23:44 +0200   author:   SvenC am

Re: Unable to receive notifications in outlook 2007   
I am setting Advise() for getting notifications from both inbox and sent 
items for a particular mail box.
/* for inbox*/
hr = HrMAPIFindInbox( m_lpMDB, &ulbeid, &lpeidInbox );
  
  if ( SUCCEEDED( hr ) ) 
  {
   hr = m_lpMDB->Advise( ulbeid, ( LPENTRYID )lpeidInbox, 
fnevObjectCreated|fnevCriticalError|fnevExtended, ( IMAPIAdviseSink * )this, 
&m_ulInboxConnection );
  }
 
 
 /* for sent items folder*/
try
 {
  hr = HrGetOneProp( m_lpMDB, PR_IPM_SENTMAIL_ENTRYID, &pProp );
  if ( SUCCEEDED( hr ) ) 
  {
   hr = m_lpMDB->Advise( pProp->Value.bin.cb, ( LPENTRYID 
)pProp->Value.bin.lpb, fnevObjectCreated|fnevCriticalError|fnevExtended, ( 
IMAPIAdviseSink * )this, &m_ulOutboxConnection );
  }
  CLog::Log( _T( "EXITING CMAILBOXMONITOR SETSENTFOLDER" ) );
  return hr;
 }

"kavitha" wrote:

> The notifications go in when the POP 3 account is removed. Can you please let 
> me know as to why the notifications are not sent with POP 3 enabled? Also 
> when the POP 3 account is disabled and the profile still continues with 
> cached mode, the notifications are not sent. When the csached mode is 
> disabled, I start receving the notications. So there is still some problem 
> with cached mode. 
> 
> "SvenC" wrote:
> 
> > Hi kavitha,
> > 
> > > I am not receiving notifications from outlook message store on COM
> > > interfaces. In outlook 2003 I am able to receive notifications when
> > > the outlook profile is in cached mode. But in outlook 2007, I am not
> > > able to connect to sinks and hence unable to receive the
> > > notification. Could you please tell me why is outlook 2007 behaving
> > > wierdly when cached mode/POP 3 account enbled with it
> > 
> > I have no troubles with Outlook 2007 in cached mode accessing only
> > an Exchange Server. Could you remove the POP3 account and see if
> > it starts working without POP3 account?
> > 
> > Also note that after your call to Advise you need to make any other
> > MAPI call to the server to initiate the notification system. A typical
> > solution is to call GetRowCount on the table you called Advise on.
> > But that didn't change with OL2007, that is with every MAPI version.
> > 
> > And again: are your Firewall settings identical on the machine with
> > OL2003 compared to OL2007?
> > 
> > --
> > SvenC
> >
date: Mon, 14 Apr 2008 23:25:00 -0700   author:   kavitha

Re: Unable to receive notifications in outlook 2007   
I am setting Advise() for receiving the notification for both inbound and 
outbound mails for a particular mail box( i.e. for both inbox and sent items 
when a mail arrives)

/* for inbox*/ 
hr = HrMAPIFindInbox( m_lpMDB, &ulbeid, &lpeidInbox );
  
  if ( SUCCEEDED( hr ) ) 
  {
   hr = m_lpMDB->Advise( ulbeid, ( LPENTRYID )lpeidInbox, 
fnevObjectCreated|fnevCriticalError|fnevExtended, ( IMAPIAdviseSink * )this, 
&m_ulInboxConnection );
  }
 
/*For sent items folder*/ 
try
 {
  hr = HrGetOneProp( m_lpMDB, PR_IPM_SENTMAIL_ENTRYID, &pProp );
  if ( SUCCEEDED( hr ) ) 
  {
   hr = m_lpMDB->Advise( pProp->Value.bin.cb, ( LPENTRYID 
)pProp->Value.bin.lpb, fnevObjectCreated|fnevCriticalError|fnevExtended, ( 
IMAPIAdviseSink * )this, &m_ulOutboxConnection );
  }
  CLog::Log( _T( "EXITING CMAILBOXMONITOR SETSENTFOLDER" ) );
  return hr;
 }

"SvenC" wrote:

> Hi kavitha,
> 
> > The notifications go in when the POP 3 account is removed. Can you
> > please let me know as to why the notifications are not sent with POP
> > 3 enabled? Also when the POP 3 account is disabled and the profile
> > still continues with cached mode, the notifications are not sent.
> > When the csached mode is disabled, I start receving the notications.
> > So there is still some problem with cached mode.
> 
> Please show the code you use to set up the notification system.
> 
> I never used POP3, so I have no experience how this affects the
> notification engine. I would expect notifications to fail if you set the
> POP3 account as default account.
> 
> --
> SvenC
>
date: Mon, 14 Apr 2008 23:28:00 -0700   author:   kavitha

Re: Unable to receive notifications in outlook 2007   
Hi SvenC,
I have given the code below. Please do look into it and reply

--Kavitha

"kavitha" wrote:

> I am setting Advise() for getting notifications from both inbox and sent 
> items for a particular mail box.
> /* for inbox*/
> hr = HrMAPIFindInbox( m_lpMDB, &ulbeid, &lpeidInbox );
>   
>   if ( SUCCEEDED( hr ) ) 
>   {
>    hr = m_lpMDB->Advise( ulbeid, ( LPENTRYID )lpeidInbox, 
> fnevObjectCreated|fnevCriticalError|fnevExtended, ( IMAPIAdviseSink * )this, 
> &m_ulInboxConnection );
>   }
>  
>  
>  /* for sent items folder*/
> try
>  {
>   hr = HrGetOneProp( m_lpMDB, PR_IPM_SENTMAIL_ENTRYID, &pProp );
>   if ( SUCCEEDED( hr ) ) 
>   {
>    hr = m_lpMDB->Advise( pProp->Value.bin.cb, ( LPENTRYID 
> )pProp->Value.bin.lpb, fnevObjectCreated|fnevCriticalError|fnevExtended, ( 
> IMAPIAdviseSink * )this, &m_ulOutboxConnection );
>   }
>   CLog::Log( _T( "EXITING CMAILBOXMONITOR SETSENTFOLDER" ) );
>   return hr;
>  }
> 
> "kavitha" wrote:
> 
> > The notifications go in when the POP 3 account is removed. Can you please let 
> > me know as to why the notifications are not sent with POP 3 enabled? Also 
> > when the POP 3 account is disabled and the profile still continues with 
> > cached mode, the notifications are not sent. When the csached mode is 
> > disabled, I start receving the notications. So there is still some problem 
> > with cached mode. 
> > 
> > "SvenC" wrote:
> > 
> > > Hi kavitha,
> > > 
> > > > I am not receiving notifications from outlook message store on COM
> > > > interfaces. In outlook 2003 I am able to receive notifications when
> > > > the outlook profile is in cached mode. But in outlook 2007, I am not
> > > > able to connect to sinks and hence unable to receive the
> > > > notification. Could you please tell me why is outlook 2007 behaving
> > > > wierdly when cached mode/POP 3 account enbled with it
> > > 
> > > I have no troubles with Outlook 2007 in cached mode accessing only
> > > an Exchange Server. Could you remove the POP3 account and see if
> > > it starts working without POP3 account?
> > > 
> > > Also note that after your call to Advise you need to make any other
> > > MAPI call to the server to initiate the notification system. A typical
> > > solution is to call GetRowCount on the table you called Advise on.
> > > But that didn't change with OL2007, that is with every MAPI version.
> > > 
> > > And again: are your Firewall settings identical on the machine with
> > > OL2003 compared to OL2007?
> > > 
> > > --
> > > SvenC
> > >
date: Tue, 15 Apr 2008 20:48:00 -0700   author:   kavitha

Re: Unable to receive notifications in outlook 2007   
Hi kavitha,

> I am setting Advise() for getting notifications from both inbox and
> sent items for a particular mail box.
> /* for inbox*/
> hr = HrMAPIFindInbox( m_lpMDB, &ulbeid, &lpeidInbox );
...
>   hr = m_lpMDB->Advise( ulbeid, ( LPENTRYID )lpeidInbox,
> fnevObjectCreated|fnevCriticalError|fnevExtended, ( IMAPIAdviseSink *
> )this, &m_ulInboxConnection );
>  }
...
>  hr = HrGetOneProp( m_lpMDB, PR_IPM_SENTMAIL_ENTRYID, &pProp );
>  if ( SUCCEEDED( hr ) )
>  {
>   hr = m_lpMDB->Advise( pProp->Value.bin.cb, ( LPENTRYID
> )pProp->Value.bin.lpb,
> fnevObjectCreated|fnevCriticalError|fnevExtended, ( IMAPIAdviseSink *
>  )this, &m_ulOutboxConnection ); }

Try to read the property PR_TEST_LINE_SPEED after your last Advise call.
You need to make any call which triggers an RPC call to get the notification
system to work.

--
SvenC
date: Wed, 16 Apr 2008 08:38:23 +0200   author:   SvenC am

Re: Unable to receive notifications in outlook 2007   
Hi SvenC,
I tried the solution provided by you and found that it dint not help me in 
resolving the problem. Let me explain you the scenario again. The problem 
occurs to me when I have both outlook 2003 and outlook 2007 servers in a 
domain. I have my outlook profile in 2007 and by default it is in cached 
mode. I should get a notification onto my application whenver i send or 
receive mails from my outlook.
I am using IMAPIAdviseSink:: OnNotify to get the notifications. Since the 
profile is in cached mode, I am not receiving any sort of notifications for 
out bound mails. Kindly do help me.

"SvenC" wrote:

> Hi kavitha,
> 
> > I am setting Advise() for getting notifications from both inbox and
> > sent items for a particular mail box.
> > /* for inbox*/
> > hr = HrMAPIFindInbox( m_lpMDB, &ulbeid, &lpeidInbox );
> ....
> >   hr = m_lpMDB->Advise( ulbeid, ( LPENTRYID )lpeidInbox,
> > fnevObjectCreated|fnevCriticalError|fnevExtended, ( IMAPIAdviseSink *
> > )this, &m_ulInboxConnection );
> >  }
> ....
> >  hr = HrGetOneProp( m_lpMDB, PR_IPM_SENTMAIL_ENTRYID, &pProp );
> >  if ( SUCCEEDED( hr ) )
> >  {
> >   hr = m_lpMDB->Advise( pProp->Value.bin.cb, ( LPENTRYID
> > )pProp->Value.bin.lpb,
> > fnevObjectCreated|fnevCriticalError|fnevExtended, ( IMAPIAdviseSink *
> >  )this, &m_ulOutboxConnection ); }
> 
> Try to read the property PR_TEST_LINE_SPEED after your last Advise call.
> You need to make any call which triggers an RPC call to get the notification
> system to work.
> 
> --
> SvenC 
> 
>
date: Thu, 17 Apr 2008 05:07:00 -0700   author:   kavitha

Re: Unable to receive notifications in outlook 2007   
Hi kavitha,

> I tried the solution provided by you and found that it dint not help
> me in resolving the problem. Let me explain you the scenario again.
> The problem occurs to me when I have both outlook 2003 and outlook
> 2007 servers in a domain.

What do you mean by Outlook 2003 and 2007 *servers*?

> I have my outlook profile in 2007 and by
> default it is in cached mode. I should get a notification onto my
> application whenver i send or receive mails from my outlook.
> I am using IMAPIAdviseSink:: OnNotify to get the notifications. Since
> the profile is in cached mode, I am not receiving any sort of
> notifications for out bound mails. Kindly do help me.

Do you get notifications on new items in the inbox?
Or do you get no notifications at all?
I have no problems in receiving notification on new incoming
elements. Never tried sent items - sorry.

--
SvenC
date: Thu, 17 Apr 2008 15:03:39 +0200   author:   SvenC am

Re: Unable to receive notifications in outlook 2007   
I am getting the notifications for incoming elements in the inbox for cached 
mode with out reading the  PR_TEST_LINE_SPEED property. I have problems only 
for outbound elements.

"SvenC" wrote:

> Hi kavitha,
> 
> > I tried the solution provided by you and found that it dint not help
> > me in resolving the problem. Let me explain you the scenario again.
> > The problem occurs to me when I have both outlook 2003 and outlook
> > 2007 servers in a domain.
> 
> What do you mean by Outlook 2003 and 2007 *servers*?
> 
> > I have my outlook profile in 2007 and by
> > default it is in cached mode. I should get a notification onto my
> > application whenver i send or receive mails from my outlook.
> > I am using IMAPIAdviseSink:: OnNotify to get the notifications. Since
> > the profile is in cached mode, I am not receiving any sort of
> > notifications for out bound mails. Kindly do help me.
> 
> Do you get notifications on new items in the inbox?
> Or do you get no notifications at all?
> I have no problems in receiving notification on new incoming
> elements. Never tried sent items - sorry.
> 
> --
> SvenC
>
date: Thu, 17 Apr 2008 06:28:01 -0700   author:   kavitha

Re: Unable to receive notifications in outlook 2007   
Hi kavitha,

> I am getting the notifications for incoming elements in the inbox for
> cached mode with out reading the  PR_TEST_LINE_SPEED property.

Look at your code: after calling Advise for the inbox you called
HrGetOneProp so you did trigger an RPC call to the server.
From your sample code you did not trigger any RPC call on the
message store after calling Advise on the sent items folder. That
was the reason why I wanted you to add that call.

> I have problems only for outbound elements.

May be the sent items folder behaves different, I have no experience
with notifications in the sent items folder.

Do you receive notifications for sent item elements when you
are not in cached mode?

--
SvenC
date: Thu, 17 Apr 2008 15:49:46 +0200   author:   SvenC am

Re: Unable to receive notifications in outlook 2007   
Hi SvenC,
please find my reply inline.	

"SvenC" wrote:

> Hi kavitha,
> 
> > I am getting the notifications for incoming elements in the inbox for
> > cached mode with out reading the  PR_TEST_LINE_SPEED property.
> 
> Look at your code: after calling Advise for the inbox you called
> HrGetOneProp so you did trigger an RPC call to the server.
> From your sample code you did not trigger any RPC call on the
> message store after calling Advise on the sent items folder. That
> was the reason why I wanted you to add that call.
> 
Code once again for analysis.

/****** Advise called for inbox/ inbound elements********/
try
	{
	               hr = HrMAPIFindInbox( m_lpMDB, &ulbeid, &lpeidInbox );
		
		if ( SUCCEEDED( hr ) ) 
		{
			hr = m_lpMDB->Advise( ulbeid, ( LPENTRYID )lpeidInbox, 
fnevObjectCreated|fnevCriticalError|fnevExtended, ( IMAPIAdviseSink * )this, 
&m_ulInboxConnection );
			
		}
		/*if ( SUCCEEDED( hr ) ) 
		{
			hr = IMAPITable::GetRowCount( 0 , longvar);
		}*/
		CLog::Log( _T( "EXITING CMAILBOXMONITOR SETINBOX" ) );
		return hr;
	}

/****** Advise called for sent items/ outbound elements********/
try
	{
		hr = HrGetOneProp( m_lpMDB, PR_IPM_SENTMAIL_ENTRYID, &pProp );
		if ( SUCCEEDED( hr ) ) 
		{
			hr = m_lpMDB->Advise( pProp->Value.bin.cb, ( LPENTRYID 
)pProp->Value.bin.lpb, fnevObjectCreated|fnevCriticalError|fnevExtended, ( 
IMAPIAdviseSink * )this, &m_ulOutboxConnection );
		}
		CLog::Log( _T( "EXITING CMAILBOXMONITOR SETSENTFOLDER" ) );
		return hr;
	}


We are not calling any HrGetOneProp for inbox folder. It is being called for 
sent items folder only.
> > I have problems only for outbound elements.
> 
> May be the sent items folder behaves different, I have no experience
> with notifications in the sent items folder.
> 
> Do you receive notifications for sent item elements when you
> are not in cached mode?
> 
Yes. I receive the notifications for the sent item elements when the mail 
box is in cached mode. 

> --
> SvenC
>
date: Sun, 20 Apr 2008 22:09:00 -0700   author:   kavitha

Re: Unable to receive notifications in outlook 2007   
sorry. For the last line in the previous reply .Yes. I receive the 
notifications for the sent item elements when the mail box is not in cached 
mode. 
"kavitha" wrote:

> Hi SvenC,
> please find my reply inline.	
> 
> "SvenC" wrote:
> 
> > Hi kavitha,
> > 
> > > I am getting the notifications for incoming elements in the inbox for
> > > cached mode with out reading the  PR_TEST_LINE_SPEED property.
> > 
> > Look at your code: after calling Advise for the inbox you called
> > HrGetOneProp so you did trigger an RPC call to the server.
> > From your sample code you did not trigger any RPC call on the
> > message store after calling Advise on the sent items folder. That
> > was the reason why I wanted you to add that call.
> > 
> Code once again for analysis.
> 
> /****** Advise called for inbox/ inbound elements********/
> try
> 	{
> 	               hr = HrMAPIFindInbox( m_lpMDB, &ulbeid, &lpeidInbox );
> 		
> 		if ( SUCCEEDED( hr ) ) 
> 		{
> 			hr = m_lpMDB->Advise( ulbeid, ( LPENTRYID )lpeidInbox, 
> fnevObjectCreated|fnevCriticalError|fnevExtended, ( IMAPIAdviseSink * )this, 
> &m_ulInboxConnection );
> 			
> 		}
> 		/*if ( SUCCEEDED( hr ) ) 
> 		{
> 			hr = IMAPITable::GetRowCount( 0 , longvar);
> 		}*/
> 		CLog::Log( _T( "EXITING CMAILBOXMONITOR SETINBOX" ) );
> 		return hr;
> 	}
> 
> /****** Advise called for sent items/ outbound elements********/
> try
> 	{
> 		hr = HrGetOneProp( m_lpMDB, PR_IPM_SENTMAIL_ENTRYID, &pProp );
> 		if ( SUCCEEDED( hr ) ) 
> 		{
> 			hr = m_lpMDB->Advise( pProp->Value.bin.cb, ( LPENTRYID 
> )pProp->Value.bin.lpb, fnevObjectCreated|fnevCriticalError|fnevExtended, ( 
> IMAPIAdviseSink * )this, &m_ulOutboxConnection );
> 		}
> 		CLog::Log( _T( "EXITING CMAILBOXMONITOR SETSENTFOLDER" ) );
> 		return hr;
> 	}
> 
> 
> We are not calling any HrGetOneProp for inbox folder. It is being called for 
> sent items folder only.
> > > I have problems only for outbound elements.
> > 
> > May be the sent items folder behaves different, I have no experience
> > with notifications in the sent items folder.
> > 
> > Do you receive notifications for sent item elements when you
> > are not in cached mode?
> > 
> Yes. I receive the notifications for the sent item elements when the mail 
> box is in cached mode. 
> 
> > --
> > SvenC
> >
date: Sun, 20 Apr 2008 22:31:00 -0700   author:   kavitha

Re: Unable to receive notifications in outlook 2007   
Sorry for the mistake in the last reply in the laast line. I do receive the 
notifications for the sent items when mail box is not in cached mode.

"kavitha" wrote:

> Hi SvenC,
> please find my reply inline.	
> 
> "SvenC" wrote:
> 
> > Hi kavitha,
> > 
> > > I am getting the notifications for incoming elements in the inbox for
> > > cached mode with out reading the  PR_TEST_LINE_SPEED property.
> > 
> > Look at your code: after calling Advise for the inbox you called
> > HrGetOneProp so you did trigger an RPC call to the server.
> > From your sample code you did not trigger any RPC call on the
> > message store after calling Advise on the sent items folder. That
> > was the reason why I wanted you to add that call.
> > 
> Code once again for analysis.
> 
> /****** Advise called for inbox/ inbound elements********/
> try
> 	{
> 	               hr = HrMAPIFindInbox( m_lpMDB, &ulbeid, &lpeidInbox );
> 		
> 		if ( SUCCEEDED( hr ) ) 
> 		{
> 			hr = m_lpMDB->Advise( ulbeid, ( LPENTRYID )lpeidInbox, 
> fnevObjectCreated|fnevCriticalError|fnevExtended, ( IMAPIAdviseSink * )this, 
> &m_ulInboxConnection );
> 			
> 		}
> 		/*if ( SUCCEEDED( hr ) ) 
> 		{
> 			hr = IMAPITable::GetRowCount( 0 , longvar);
> 		}*/
> 		CLog::Log( _T( "EXITING CMAILBOXMONITOR SETINBOX" ) );
> 		return hr;
> 	}
> 
> /****** Advise called for sent items/ outbound elements********/
> try
> 	{
> 		hr = HrGetOneProp( m_lpMDB, PR_IPM_SENTMAIL_ENTRYID, &pProp );
> 		if ( SUCCEEDED( hr ) ) 
> 		{
> 			hr = m_lpMDB->Advise( pProp->Value.bin.cb, ( LPENTRYID 
> )pProp->Value.bin.lpb, fnevObjectCreated|fnevCriticalError|fnevExtended, ( 
> IMAPIAdviseSink * )this, &m_ulOutboxConnection );
> 		}
> 		CLog::Log( _T( "EXITING CMAILBOXMONITOR SETSENTFOLDER" ) );
> 		return hr;
> 	}
> 
> 
> We are not calling any HrGetOneProp for inbox folder. It is being called for 
> sent items folder only.
> > > I have problems only for outbound elements.
> > 
> > May be the sent items folder behaves different, I have no experience
> > with notifications in the sent items folder.
> > 
> > Do you receive notifications for sent item elements when you
> > are not in cached mode?
> > 
> Yes. I receive the notifications for the sent item elements when the mail 
> box is in cached mode. 
> 
> > --
> > SvenC
> >
date: Sun, 20 Apr 2008 22:40:00 -0700   author:   kavitha

Re: Unable to receive notifications in outlook 2007   
Hi kavitha,

> We are not calling any HrGetOneProp for inbox folder. It is being
> called for sent items folder only.
>>> I have problems only for outbound elements.

I show only the relevant code parts:

> hr = m_lpMDB->Advise( ulbeid, ( LPENTRYID )lpeidInbox,
> fnevObjectCreated|fnevCriticalError|fnevExtended, ( IMAPIAdviseSink *
> )this, &m_ulInboxConnection );
...
> hr = HrGetOneProp( m_lpMDB, PR_IPM_SENTMAIL_ENTRYID, &pProp );

What I wanted to say is that you have to call another method on the object 
you
call Advise in, so that an RPC call is going to the server. So you called 
Advise
on m_lpMDB and after that you call HrGetOneProp on m_lpMDB.

> hr = m_lpMDB->Advise( pProp->Value.bin.cb, ( LPENTRYID
> )pProp->Value.bin.lpb,
> fnevObjectCreated|fnevCriticalError|fnevExtended, ( IMAPIAdviseSink *
> )this, &m_ulOutboxConnection ); }

Add another HrGetOneProp on m_lpMDB. Any property will do so you should
choose something which doesn't cost the Server two much processing like
PR_TEST_LINE_SPEED.
Please check if reading that property does start your notifications on sent
items as well.

--
SvenC
date: Mon, 21 Apr 2008 09:35:11 +0200   author:   SvenC am

Re: Unable to receive notifications in outlook 2007   
There are 2 different functions which calls advise for inbox and sent items 
seperately. I tried to read the property PR_TEST_LINE_SPEED after calling 
Advise for sent items folder. But it did not help me to flush the error. I 
was not able to get notifications for the outbound mails even after reading 
PR_TEST_LINE_SPEED. 

/**** This is the function which calls advise for Sent items folder*****/
HRESULT SetOutbox()
{
	
	HRESULT			hr			= S_OK;
	LPSPropValue	pProp		= NULL;
	try
	{
		hr = HrGetOneProp( m_lpMDB, PR_IPM_SENTMAIL_ENTRYID, &pProp );
		if ( SUCCEEDED( hr ) ) 
		{
			hr = m_lpMDB->Advise( pProp->Value.bin.cb, ( LPENTRYID 
)pProp->Value.bin.lpb, fnevObjectCreated|fnevCriticalError|fnevExtended, ( 
IMAPIAdviseSink * )this, &m_ulOutboxConnection );
		}
		if ( SUCCEEDED( hr ) ) 
		{
			hr = HrGetOneProp( m_lpMDB, PR_TEST_LINE_SPEED, &pProp );
			if ( SUCCEEDED( hr ) ) 
			{
				Log( _T( "Successfully read the property PR_TEST_LINE_SPEED" ) );
			}

			else
			{
				Log( _T( "Failed to read PR_TEST_LINE_SPEED property" ) );
			}

		}
				return hr;
	}
	catch(...)
	{
		TCHAR pszError[MAX_PATH];
		ZeroMemory( pszError, MAX_PATH );
		
		if ( nRetVal )
		{
		       Log( _T( pszError ) );
		}
		return hr;
		
	}
}

/**** This is a seperate function which calls advise for inbox folder*****/

HRESULTSetInBox()
{
	     ULONG			ulbeid		= 0L;
	//ULONG *longvar ;
    LPENTRYID		lpeidInbox		= NULL;
    HRESULT			hr			= S_OK;
	try
	{
		hr = HrMAPIFindInbox( m_lpMDB, &ulbeid, &lpeidInbox );
		
		if ( SUCCEEDED( hr ) ) 
		{
			hr = m_lpMDB->Advise( ulbeid, ( LPENTRYID )lpeidInbox, 
fnevObjectCreated|fnevCriticalError|fnevExtended, ( IMAPIAdviseSink * )this, 
&m_ulInboxConnection );
			
		}
						return hr;
	}
	catch(...)
	{
		TCHAR pszError[MAX_PATH];
		ZeroMemory( pszError, MAX_PATH );
		
		if ( nRetVal )
		{
			Log( _T( pszError ) );
			
		}
		return hr;
	}
}

"SvenC" wrote:

> Hi kavitha,
> 
> > We are not calling any HrGetOneProp for inbox folder. It is being
> > called for sent items folder only.
> >>> I have problems only for outbound elements.
> 
> I show only the relevant code parts:
> 
> > hr = m_lpMDB->Advise( ulbeid, ( LPENTRYID )lpeidInbox,
> > fnevObjectCreated|fnevCriticalError|fnevExtended, ( IMAPIAdviseSink *
> > )this, &m_ulInboxConnection );
> ....
> > hr = HrGetOneProp( m_lpMDB, PR_IPM_SENTMAIL_ENTRYID, &pProp );
> 
> What I wanted to say is that you have to call another method on the object 
> you
> call Advise in, so that an RPC call is going to the server. So you called 
> Advise
> on m_lpMDB and after that you call HrGetOneProp on m_lpMDB.
> 
> > hr = m_lpMDB->Advise( pProp->Value.bin.cb, ( LPENTRYID
> > )pProp->Value.bin.lpb,
> > fnevObjectCreated|fnevCriticalError|fnevExtended, ( IMAPIAdviseSink *
> > )this, &m_ulOutboxConnection ); }
> 
> Add another HrGetOneProp on m_lpMDB. Any property will do so you should
> choose something which doesn't cost the Server two much processing like
> PR_TEST_LINE_SPEED.
> Please check if reading that property does start your notifications on sent
> items as well.
> 
> --
> SvenC 
> 
>
date: Mon, 21 Apr 2008 20:56:00 -0700   author:   kavitha

Re: Unable to receive notifications in outlook 2007   
Hi kavitha,

> There are 2 different functions which calls advise for inbox and sent
> items seperately. I tried to read the property PR_TEST_LINE_SPEED
> after calling Advise for sent items folder. But it did not help me to
> flush the error. I was not able to get notifications for the outbound
> mails even after reading PR_TEST_LINE_SPEED.

Sorry, then I have no other idea.

--
SvenC
date: Tue, 22 Apr 2008 08:23:03 +0200   author:   SvenC am

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us