Changing the FROM address for all email messages composed

D

Dave

I have two users sharing an email account. I would like to change the
FROM address depending on which computer it is sent from.

I've explored various attempts at Application_Send (where
unfortunately SenderName is readonly) and the Item_Send handler of the
Message form (which I seem to be unable to change) without success.

Can some wise soul point me in the right direction?

Many thanks,
Dave
 
N

Natarajan

Hi Dave,

Use Item.SentOnBehalfOfName = "(e-mail address removed)" to sent the senders name.

Regds
Natarajan
 
D

Dave

Hi Dave,

Use Item.SentOnBehalfOfName = "(e-mail address removed)" to sent the senders name.

Regds
Natarajan

Unfortunately this does not work, because by the time you're in
Application_ItemSend the mailitem has been finalized into the
transport and cannot be changed.

Is there some other opportunity to make this change that will work?

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As
Boolean)
If TypeName(Item) = "MailItem" Then
Dim olMailItem As MailItem
Set olMailItem = Item
sName = olMailItem.SentOnBehalfOfName
If sName = "" Then
olMailItem.SentOnBehalfOfName = "(e-mail address removed)"
Item.Save
End If
End If

End Sub
 

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