Article ID: 323928 - View products that this article applies to.
This article was previously published under Q323928
When you try to programmatically send a mail message, you may receive the following error message:
You do not have the permission to send the message on behalf of the specified user.
This issue may occur in a custom mail message form if you use the Send method to programmatically send a mail message after it has arrived in an Inbox. In this case, the From field is already set to the user who sent the message. A permissions error occurs because you do not have permission to send mail on the other user's behalf.
When an item is opened from the Inbox or another folder, the item is in read mode instead of compose mode. Microsoft recommends that you do not try to send an item that is in read mode. Instead, use the Outlook object model the same way that the user interface behaves; always create a new item to send. Use one of the following methods to create a new item to send, so that the new item is in compose mode:
To work around this issue, use the SentOnBehalfOfName property to reset the From field. Typically, you have to do so in both the Item_Open and Item_Send events of a custom mail message form. However, if you use this method, behavior may be inconsistent. Therefore, Microsoft recommends that you do not use this method.
For additional information about available resources and answersto frequently asked questions about Microsoft Outlook solutions, click the article numbers below to view the articles in the Microsoft Knowledge Base:
(http://support.microsoft.com/kb/287530/EN-US/ )OL2002: Questions About Custom Forms and Outlook Solutions
(http://support.microsoft.com/kb/146636/EN-US/ )OL2000: Questions About Custom Forms and Outlook Solutions
(http://support.microsoft.com/kb/182349/EN-US/ )OL98: Questions About Custom Forms and Outlook Solutions
Article ID: 323928 - Last Review: August 19, 2004 - Revision: 4.2