> 1. OOM in Outlook 2007 - MailItem.SendUsingAccount property
> 2. Extended MAPI (C++/Delphi only) - use IOlkAccountMgr to read the account
[quoted text clipped - 20 lines]
> > Many thanks for any ideas on this,
> > Mark
HI JHoep,
> Following along this logic, is there a way to use
> MailItem.SendUsingAccount that will attempt to send the email via one
> account, but if that fails, to use a second account that is set up in
> Outlook?
I guess the problem is that using the wrong account does not result
in a failure but will just keep the mail in the outbox until the smtp server
gets available, correct?
> I currently have two accounts, one which works when I have my laptop
> at work (through one SMTP server) and one which works at home
> (through a different SMTP server). I am trying to avoid having to
> manually select the account every time I am at the non-default
> account location.
You might need to check the availability of some other resource, e.g.
a file on a network share which is only available when you are in your
work network. That should help to figure out which account to use.
--
SvenC
JHoep - 29 Mar 2008 13:10 GMT
Ok, I definitely can check for the existence of a network drive or other
shared file that would be accessible only at work. But how do I do that?
What would be the basic commands/syntax to have Outlook do the check and then
pick the account to send the email from (ideally this happens behind the
scenes when the "Send" button is pressed).
Thanks.
Jason
> HI JHoep,
>
[quoted text clipped - 19 lines]
> --
> SvenC
SvenC - 29 Mar 2008 14:36 GMT
Hi JHoep,
> Ok, I definitely can check for the existence of a network drive or
> other shared file that would be accessible only at work. But how do
> I do that? What would be the basic commands/syntax to have Outlook do
> the check and then pick the account to send the email from (ideally
> this happens behind the scenes when the "Send" button is pressed).
I thought you wanted to do some macro programming.
When you want Outlook to automatically choose the accout you could
add some code in the ItemSend event of Outlook.Application. I am not
sure if you can change the account at this point but you can at least try
it.
--
SvenC