Send/Receive Mail in Oulook using C#

  • Thread starter Thread starter ProgrammingTestAccount
  • Start date Start date
P

ProgrammingTestAccount

I'm trying to write a program that uses Outlook to send and receive
mails for a certain account, and I want to programly enter the
password for the account when execute send and receive command, how
can I do that?
 
You can't.

If this is an Outlook account that's already configured then it would have
to be the default sending account. If it's Outlook 2007 you can intercept
the item.Send event or the Application.ItemSend event and use the Accounts
collection to get the desired Account and set the item.SendUsingAccount
object property to the desired account.

With other versions of Outlook you can't do that. In no version of Outlook
can you set the password for an account as you use it.
 
Back
Top