Emailing From Outlook - Assign From Field

  • Thread starter Thread starter lbernarde
  • Start date Start date
L

lbernarde

I am sending emails on behalf of a reporting mailbox. I want to change the
from field to be "(e-mail address removed)". I found the SentOnBehalfOfName
command, but it is not working. Any suggestions?
Thanks
 
First and foremost (and to reiterate), this is an Outlook question. Please
post future questions in the Outlook discussion group. Although you may be
using Access to manipulate Outlook, you are still working with Outlook - just
not directly.

Without seeing the code, I can't answer the question. When I checked the
list of properties for an Outlook MailItem, there is no .FROM property. It
can be assumed then that Outlook was designed so that you cannot
programically create a message and make it look like it was sent from
somebody else. Likewise the .SenderEmailAddress is read-only. I do know that
the Sent on Behalf property exists for accountability purposes as in "From
David Holley Sent on Behalf of Rachel Ray".

What you'll need to do is ask the Outlook newsgroup how you can programicaly
send a message from a different Mailbox to whom you have the appropriate
rights.
 
Keep in mind that when you try to access certain fields of the MailItem
object, you'll get a security warning as those properties were the most
utlized by various email viruses and worms.

Outlook Redemption can be downloaded and used to bypass the security
warnings. http://www.dimastr.com/redemption/
 
Try displaying the message rather than using the Send option. That way you
will be able to see where it is failing.

Dim olApp As Outlook.Application
Dim olItem As Outlook.MailItem
Set olApp = New Outlook.Application
Set olItem = olApp.CreateItem(olMailItem)
olItem.SentOnBehalfOfName = "(e-mail address removed)"
olItem.Recipients.Add ("(e-mail address removed)")
olItem.Display
 
Back
Top