Platform SDK: CDO for Windows 2000

From Property

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

[Visual Basic]
Property From as String
[C++]
HRESULT get_From(BSTR* pVal);
HRESULT put_From(BSTR Val);
[IDL]
HRESULT [propget] From([out,retval] BSTR* pVal);
HRESULT [propput] From([in] BSTR Val);

Remarks

This property is also available as the urn:schemas:mailheader:from and urn:schemas:httpmail:from fields.

The string in the From property represents the full messaging addresses of the message author or authors, as shown in the following example:

"Jane Doe" <JaneDoe@microsoft.com>, <JohnDoe@microsoft.com>, personb@microsoft.com

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." <jjones@microsoft.com>, "Jane Doe" <JaneDoe@microsoft.com>

If you do not set the From property before calling the IMessage.Send method, Microsoft Collaboration Data Objects (CDO) uses the IMessage.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.

See Also

urn:schemas:mailheader:from Field

urn:schemas:httpmail:from Field