Why is OL not keeping the correct sender account?
Hello,
I found a solution to this problem. I simply needed to set the Account
again to let Outlook do what I want. The following way helped me out:
Public Function SendUsingRDO(ByRef Mailobject As Object)
Dim RDOSession As Redemption.RDOSession
Dim RDOMessage As Redemption.RDOMail
Dim RDOAccount As Redemption.RDOAccount
' save the mail, in case it is not saved until now
Mailobject.Save
Set RDOSession = CreateObject("Redemption.RDOSession")
RDOSession.MAPIOBJECT = Application.Session.MAPIOBJECT
Set RDOMessage = RDOSession.GetMessageFromID(Mailobject.EntryID)
Set RDOAccount = RDOMessage.Account ' get account
If Not RDOAccount Is Nothing Then
' set the account again
RDOMessage.Account = RDOSession.Accounts(RDOAccount.Name)
RDOMessage.Save
End If
RDOMessage.Send
SendUsingRDO = True
End Function
At first I read the Account that is used (reading). Upon this, I set
this value again (writing). Now calling the .Send method forces
Outlook to use the account that has been set but ignored. Strange...
Kukulkan
|