Partager via


From Property

From Property

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

The e-mail addresses of the principal author or authors of this message.

Applies To

IMessage Interface

IWorkflowMessage Interface

Type Library

Microsoft CDO for Exchange 2000 Library

DLL Implemented In

CDOEX.DLL

Syntax

[Visual Basic]Property From As String

[C++]HRESULT get_From(BSTRpVal);
HRESULT put_From(BSTR Val);

Parameters

  • pVal
    Returns the value of the From property as a reference to a BSTR.
  • Val
    Sets the value of the From property to the value of the BSTR.

Remarks

This property is also available as the urn:schemas:mailheader:from field (from Field) and the urn:schemas:httpmail:from field (from Field).

The string in the From property represents the messaging users designated by their full messaging addresses. See the BCC Property for more information about formatting and setting e-mail address properties.

If you do not set From before calling the Send Method, Collaboration Data Objects (CDO) uses the Sender Property instead. Either the IMessage Interface::From, or the Sender Property, or both, must be set prior to sending a message. If neither IMessage Interface::From nor Sender Property is set before calling the Send Method, an exception is raised. If you do not set the IMessage Interface::From before calling the Post Method, an exception is raised; the Sender Property is not used for NNTP.

The distinction between the IMessage Interface::From and the Sender Property is that Sender Property represents the messaging user that actually submits the message, while IMessage Interface::From designates its principal author(s). If these are the same messaging user, it is only necessary to set IMessage Interface::From, and it is recommended to leave Sender Property unset in this case.

Send us your feedback about the Microsoft Exchange Server 2003 SDK.

Build: June 2007 (2007.618.1)

© 2003-2006 Microsoft Corporation. All rights reserved. Terms of use.