A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

The sender problems, help me pls?



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old January 5th 09, 02:59 AM posted to microsoft.public.outlook.program_addins
ryotyankou
external usenet poster
 
Posts: 4
Default The sender problems, help me pls?

I'm using VC++2005 and ATL to develop a outlook addin. I have two problems:
1. I want to get the sender name of CurrentItem when send mail(outlookspy). I
searched a lot on the internet. Finally i use the MAPI to get it, it is ok,
but the receiver can't open the message(encrypted).
What i do is that MailItem-Save, then getprops InetAcct_GUID = { 0x00062008,
0x0000, 0x0000, { 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 } };id =
0x8581; I don't know the reason. How could i get the sender string?
2. How could i set the account to send email in background? Say i have two
accounts A and B, A is the default account, when C send a mail to B, I want
to use B automatically reply a message to C. But the default account is A,
how could i use B to send it?
Any tips or advices will be good, thx.

Ads
  #2  
Old January 5th 09, 09:41 AM posted to microsoft.public.outlook.program_addins
ryotyankou
external usenet poster
 
Posts: 4
Default The sender problems, help me pls?

After search the other forum, i found a way to fix my first problem, i will
try it(I almost known nothing to VB).
---------------------------
Sue Mosher 02-Sep-2004 07:51
Gudbrandur, you detect the sending account for a message by using CommandBars
techniques to look at what account is selected on the user's toolbar. See
http://www.outlookcode.com/d/tips/commandbarfun.htm
--------------------------------
This post is too old, posted at 2004. Are there some other ways to fix my
first problem? I'm using outlook2003 and 2007. Thx.

  #3  
Old January 6th 09, 09:21 AM posted to microsoft.public.outlook.program_addins
ryotyankou via OfficeKB.com
external usenet poster
 
Posts: 101
Default The sender problems, help me pls?

My first problem is fixed, save the item, the getprops, it is ok. The error i
said before is caused by other reason.
Then, how about my second problem? Thx very much.

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...ddins/200901/1

  #4  
Old January 6th 09, 06:53 PM posted to microsoft.public.outlook.program_addins
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default The sender problems, help me pls?

UseMailItem.SendUsingAccount property (Outlook 2007 specific).

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"ryotyankou via OfficeKB.com" u48591@uwe wrote in message
news:8fc5a50ffeeda@uwe...
My first problem is fixed, save the item, the getprops, it is ok. The
error i
said before is caused by other reason.
Then, how about my second problem? Thx very much.

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...ddins/200901/1



  #5  
Old January 7th 09, 06:20 AM posted to microsoft.public.outlook.program_addins
ryotyankou via OfficeKB.com
external usenet poster
 
Posts: 101
Default The sender problems, help me pls?

Thank you Dmitry, but how about outlook2003, the main task of our product
should be implemented on 2003 not 2007.(I known outlook2007 have some new
interfaces and structruces can do the job easily).

Dmitry Streblechenko wrote:
UseMailItem.SendUsingAccount property (Outlook 2007 specific).


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...ddins/200901/1

  #6  
Old January 8th 09, 05:13 AM posted to microsoft.public.outlook.program_addins
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default The sender problems, help me pls?

You can set these properties using Extended MAPI (shouldn't be a problem if
you are using C++) - IMessage interface can be obtained through the
MailItem.MAPIOBJECT property. To retrieve the accoutn naame and id, use the
IOlkAccountManager interface.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"ryotyankou via OfficeKB.com" u48591@uwe wrote in message
news:8fd0a5122dad4@uwe...
Thank you Dmitry, but how about outlook2003, the main task of our product
should be implemented on 2003 not 2007.(I known outlook2007 have some new
interfaces and structruces can do the job easily).

Dmitry Streblechenko wrote:
UseMailItem.SendUsingAccount property (Outlook 2007 specific).


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...ddins/200901/1



  #7  
Old January 8th 09, 10:45 AM posted to microsoft.public.outlook.program_addins
ryotyankou via OfficeKB.com
external usenet poster
 
Posts: 101
Default The sender problems, help me pls?

That's great, i will try it tommorrow. How can i use this interface to set
the account to send email? I find a sample on codeproject.com. It can
retrieve all accounts, but how to set the default account, the SetOrder()
function? But how could i know which one is the current default account?
Thanks very much.

Dmitry Streblechenko wrote:
You can set these properties using Extended MAPI (shouldn't be a problem if
you are using C++) - IMessage interface can be obtained through the
MailItem.MAPIOBJECT property. To retrieve the accoutn naame and id, use the
IOlkAccountManager interface.


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...ddins/200901/1

  #8  
Old January 9th 09, 12:12 AM posted to microsoft.public.outlook.program_addins
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default The sender problems, help me pls?

The first account in the list returned by IOlkAccountManager::GetOrder
method is teh default one.
You can play with IOlkAccountManager in OutlookSpy - click Misc |
IOlkAccountManager.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"ryotyankou via OfficeKB.com" u48591@uwe wrote in message
news:8fdf87823e701@uwe...
That's great, i will try it tommorrow. How can i use this interface to set
the account to send email? I find a sample on codeproject.com. It can
retrieve all accounts, but how to set the default account, the SetOrder()
function? But how could i know which one is the current default account?
Thanks very much.

Dmitry Streblechenko wrote:
You can set these properties using Extended MAPI (shouldn't be a problem
if
you are using C++) - IMessage interface can be obtained through the
MailItem.MAPIOBJECT property. To retrieve the accoutn naame and id, use
the
IOlkAccountManager interface.


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...ddins/200901/1



  #9  
Old January 9th 09, 09:16 AM posted to microsoft.public.outlook.program_addins
ryotyankou via OfficeKB.com
external usenet poster
 
Posts: 101
Default The sender problems, help me pls?

Thank you Dmitry, the IOlkAccountManager can Set the default account, but i
still have question here.
Say A is the default account, B is another, and C send a message to B. B
should auto reply a message to C.
This is my code flow for repy message to C:
1. Set specified account(B) as default.(SetOrder)
2. Create the message and send it.
3. Restore the original account(A).(SetOrder again)
well, the problem is that How could i known when the message is already sent.
The result of my code is alway send by A. If i mark the 3. It can work(send
by B). But it is bad for that change the default account and user may don't
know that, right?
In one word, when should i do the action 3?
Thanks in advance.

Dmitry Streblechenko wrote:
The first account in the list returned by IOlkAccountManager::GetOrder
method is teh default one.
You can play with IOlkAccountManager in OutlookSpy - click Misc |
IOlkAccountManager.


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...ddins/200901/1

  #10  
Old January 9th 09, 04:34 PM posted to microsoft.public.outlook.program_addins
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default The sender problems, help me pls?

Do not reset the default account, simply set the appropriate named
properties on the message to tell Outlook which account it should use for
sending.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"ryotyankou via OfficeKB.com" u48591@uwe wrote in message
news:8feb53939ec5d@uwe...
Thank you Dmitry, the IOlkAccountManager can Set the default account, but
i
still have question here.
Say A is the default account, B is another, and C send a message to B. B
should auto reply a message to C.
This is my code flow for repy message to C:
1. Set specified account(B) as default.(SetOrder)
2. Create the message and send it.
3. Restore the original account(A).(SetOrder again)
well, the problem is that How could i known when the message is already
sent.
The result of my code is alway send by A. If i mark the 3. It can
work(send
by B). But it is bad for that change the default account and user may
don't
know that, right?
In one word, when should i do the action 3?
Thanks in advance.

Dmitry Streblechenko wrote:
The first account in the list returned by IOlkAccountManager::GetOrder
method is teh default one.
You can play with IOlkAccountManager in OutlookSpy - click Misc |
IOlkAccountManager.


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...ddins/200901/1



 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Block Sender List Problems LVM Outlook Express 2 June 25th 07 03:18 PM
Sender = Recipient Jon Outlook Express 4 June 18th 06 11:15 PM
PlanPlus v 3 (and Outlook 2003 SP2) - install problems, uninstall problems, bugs? kkernspa Add-ins for Outlook 0 April 9th 06 03:07 AM
can i group emails by sender & by number of items for each sender baffled_by_tech Outlook - Using Contacts 2 March 5th 06 08:27 PM
Junk mail: How to create a button for "Add sender to blocked sender list" Nananana Outlook - General Queries 2 February 2nd 06 12:37 PM


All times are GMT +1. The time now is 08:40 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.