Outlook Script Sending Mail using another account ?

B

bbnimda

Hi all,

I use personal Task Item, I added à Button to this task, this button create
and send an email, but I uses the identity of the curent user, want to send
the mail as the Task Owner (email saved in a field) or distribution list
mail ([email protected])

is there a way to do that ?

tks
 
K

Ken Slovak - [MVP - Outlook]

Outlook version?

If this is Outlook 2007 you can use the new MailItem.SendUsingAccount
property to set the sending account, assuming you have permissions to send
as that email address and it's one of the Outlook profile's accounts.
Otherwise you'd have to use the SentOnBehalfName property.
 
B

bbnimda

Tks a lot, I work perfectly

but to prevent possible manipulation, Is it possible to hide the "from"
field in the mail.... because when my click button create the mail I don't
send the mail direcly I use mailItem.Display to alloy the current user to
add some text to the mail " a small note Note " to prevent user from adding
there anotation to the task

is there a way ??

another question
Or if this action is not possible, can we make the from field read only

tks for your help Ken
 
K

Ken Slovak - [MVP - Outlook]

I suppose you could get the state of the relevant ribbon control using the
CommandBars.GetPressedMso() method from the Office library to see about
whether or not the From field is showing and then use ExecuteMso() to toggle
it if it is. There's no way to make that field read-only.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top