Setting the send account

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

I have a VBA macro that parses an incoming email and creates a new email ready to be sent.

I can program everything about the email except the account to use when sending and I always want to use a different account from the one the email was received through (which is the default for the email).

How can I change the 'send using' account through VBA?

Regards
cokecan
 
There is no offcically supported way of doing that, even though you can set
a couple of named Extended MAPI properties that tell Outlook which account
it must use. In case of Exchange you can use MailItem.SentOnBehalfOfName
property (you must be explicitly given a permission to send on behalf of
that account). In case of SMTP transport, you can set a named property that
overwrites the "From" RFC822 header using Extended MAPI/CDO 1.21/Redemption:
http://www.dimastr.com/redemption/faq.htm#14

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool


cokecan said:
Hi

I have a VBA macro that parses an incoming email and creates a new email ready to be sent.

I can program everything about the email except the account to use when
sending and I always want to use a different account from the one the email
was received through (which is the default for the email).
 
-----Original Message-----
Hi

I have a VBA macro that parses an incoming email and
creates a new email ready to be sent.
I can program everything about the email except the
account to use when sending and I always want to use a
different account from the one the email was received
through (which is the default for the email).
How can I change the 'send using' account through VBA?

Regards
cokecan
.
I am a real novice and am trying to do the same thing you
are. From parsing the incoming e-mail to sending the new
one via a different account. I would really appreciate it
if you posted your code or e-mailed it to me.
Regards
Carljp
 
Back
Top