MWE
01-03-2016, 08:34 AM
I am (still) running ol2003. I wish to change the sender name on an email as it is sent out. I have explored several approaches
manually changing the user name in the profile set up. That works but takes time and requires that you remember to change it back later. Also, I want the approach to work within VBA procedures so manual fiddling will not work and I have not found a way to change the user name for a profile using VBA.
adding another account to a given profile which is "send only" with the required user name. That works but only for a single user name
I thought it would be simple to write a VBA macro that would do this. I assumed that the relevant attribute for an ol mailitem would be SenderName and I would simply change SenderName and send the email. But SenderName is a read only attribute.
So I tried using SentOnBehalfOf which apparently requires that the provided string refers to a contact. Which means that a bogus contact is required for each "other" Sender Name. That approach works and the recipient sees the Alt Name as the sender in his/her InBox (which is what I want) but requires a bogus contact be created for each other sender, is still a bit more work than it should be and not quite as clean as I would like
So I switched to Redemption; SenderName is not read only for an RDOmailitem. The code runs fine and SenderName is what I want when the RDOmailitem is sent, but when the email arrives, the Sender is the original user name. So maybe SenderName is not the right attribute??
Any suggestions?
manually changing the user name in the profile set up. That works but takes time and requires that you remember to change it back later. Also, I want the approach to work within VBA procedures so manual fiddling will not work and I have not found a way to change the user name for a profile using VBA.
adding another account to a given profile which is "send only" with the required user name. That works but only for a single user name
I thought it would be simple to write a VBA macro that would do this. I assumed that the relevant attribute for an ol mailitem would be SenderName and I would simply change SenderName and send the email. But SenderName is a read only attribute.
So I tried using SentOnBehalfOf which apparently requires that the provided string refers to a contact. Which means that a bogus contact is required for each "other" Sender Name. That approach works and the recipient sees the Alt Name as the sender in his/her InBox (which is what I want) but requires a bogus contact be created for each other sender, is still a bit more work than it should be and not quite as clean as I would like
So I switched to Redemption; SenderName is not read only for an RDOmailitem. The code runs fine and SenderName is what I want when the RDOmailitem is sent, but when the email arrives, the Sender is the original user name. So maybe SenderName is not the right attribute??
Any suggestions?