sending through a specific account.

  • Thread starter Thread starter Sharad Naik
  • Start date Start date
S

Sharad Naik

I have a few accounts in outlook.

How do I send messages through a specific account, without manually setting
that account as default?

OR
can I change the smtp server of the default account,
through macro?

Thanks in advance

Sharad
 
I've found that in W200Pro, Outlook 2000, Tools->Services on the Delivery
tab, the first account in the list (note the up/down arrows to move
accounts, which applies to the account-order email is retrieved from a
server) is the default account used if you do not fill in the "From" address
in an email sent. I haven't confirmed it, but the "From" field is also used
as the reply-to field, else the default is used.

(It's interesting that if you do fill in the "From" field (with something
other than the default), the email can indicate "From <whatever you filled
in>, via <default account>", or something like that. At least, that's what I
saw when I Cc'd myself.)

Outtaluck Express (at least, I think it was OE) had a nice select-from list
I wish Outtaluck had!

Phil Reinemann
 
Hi Phil,

in CW mode the topmost account from delivery tab is used. In IMO mode
you can choose the account afaik somewhere via the commandbars.

To set the from or reply-to address is possible via the Outlook object
model and VBA. Anyway, the meaning of choosing an account is to set the
pop or smtp server. That´s not possible via VBA.
 
Well Michael,

The default smtp server must be somewhere in the registry. Do you know the
registry key for this?
I think through VBA it is possible to change registry keys, isn't it?
(suddenly I am not sure.)

Sharad
 
Hi Sharad,

for OL 2000 the accounts are in:
HKEY_CURRENT_USER\Software\Microsoft\Office\Outlook\OMI Account Manager

and the profiles:
HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows
Messaging Subsystem\Profiles

Because each profile has it´s own first account there must be somewhere
a relation. Maybe some other registry keys are involved?

Anyway, so far this doesn´t help you, because OL reads the settings only
once while starting.
I think through VBA it is possible to change registry keys, isn't it?
(suddenly I am not sure.)

Afaik with VBA you can read/edit only keys below:
HKEY_CURRENT_USER\Software\VB and VBA Program Settings

For full acces to the registry you will need some Win32 APIs.
 
Back
Top