CDOMessage.Frommethod
The messaging address of the principal author of the message.
Syntax
FUNCTION From (BYREF wszFrom AS WSTRING) AS HRESULT
Parameters
| Name | Description | |
|---|---|---|
wszFrom | The string in the From method represents the full messaging addresses of the message author or authors, as shown in the following example: "Jane Doe" <example@example.com>, <example@example.com>, example2@example.com<br>Commas serve as address separators; however, commas are not parsed as separators when they appear in an address that is enclosed in double quotes, such as the following: "John Jones, Jr." <example@example.com>, "Jane Doe" <example@example.com>If you do not set the From property before calling the Send method, Microsoft Collaboration Data Objects (CDO) uses the Sender property if it is present. If neither the From and Sender properties are set before calling the Send method, an exception is raised. The Sender property is not used with Network News Transfer Protocol (NTTP). The difference between the From and Sender properties is that the Sender property represents the messaging user that actually submits the message, while the From property designates its principal author or authors. If the author and the sender are the same, it is only necessary to set the From property, and it is recommended to leave the Sender property unset in this case. |
Return value
S_OK (0) or an HRESULT code.
Description
The messaging address of the principal author of the message.
Reference
- Include file
CDOMessage.inc - Defined in AfxNova/CDOMessage.inc:203
- Documented in COM/CDOMessage Class.md
- Topic: CDOMessage Class