Send from different account

  • Thread starter Thread starter Leon Mayne
  • Start date Start date
L

Leon Mayne

Hi all,
When I send an email, how can I choose which of my email accounts to send
the email from?
 
-----Original Message-----
Hi all,
When I send an email, how can I choose which of my email accounts to send
the email from?

Are you talking about when you're using Outlook as a user,
or from code?

If you mean as a user, this is the wrong newsgroup. This
group is for programming issues. That said, on the e-mail
form, after you've written & addressed the e-mail, click
on the little black triangle just to the right of the SEND
button. It will let you choose which account to send from.

If you meant from code, you could look into setting the
SenderName, ReplyRecipientNames and/or SentOnBehalfOfName
properties of the mailItem. This won't actually send the
mail from a different account, but maybe changing the name
is all you need?

If not, perhaps someone else knows how to do this in code.

-Andrew
 
Andrew said:
If you mean as a user, this is the wrong newsgroup.

I meant using VB :-)
If you meant from code, you could look into setting the
SenderName, ReplyRecipientNames and/or SentOnBehalfOfName
properties of the mailItem.

Tried that, but they are all read only properties of the mailitem object, so
they can't be set on a new message.
 
If using Outlook 2000 Internet only mode, Outlook 2002 or 2003 you can
do what you want by finding the button for the account you want to
send with and calling its Execute method. For example, in Outlook 2003
in a new mail item (Inspector) there's an Accounts button in the
Standard toolbar. Getting the button for the account you want to use
from there and then using Execute on that button will send the message
using that account when Send is pressed. Setup is somewhat different
depending on the Outlook version.

Other than that CDO 1.21 can be used to send an item from a specific
identity if you are using Exchange server. That would be done by
creating a dynamic logon using a GAL AddressEntry object.
 
Back
Top