Platform SDK: Exchange 2000 Server |
[This is preliminary documentation and subject to change.]
The email 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);
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 messaging users designated by their full messaging addresses:
"Jane Doe" <JaneDoe@microsoft.com>, <JohnDoe@microsoft.com>, personb@microsoft.com
Commas serve as address separators. However commas are not parsed as separators when enclosed in double quotes, such as:
"John Jones, Jr." <jjones@microsoft.com>, "Jane Doe" <JaneDoe@microsoft.com>
The quotes must appear as characters in the string and are not those used to denote a string in Visual Basic or C++. For example,
iMsg.To = " ""John Jones, Jr."" <jjones@microsoft.com>, ""Jane Doe"" <JaneDoe@microsoft.com>"
in Visual Basic, or
pMsg->put_To(_bstr_t(" \"John Jones, Jr.\" <jjones@microsoft.com>, \"Jane Doe\" <JaneDoe@microsoft.com>"));
in C++.
If you do not set From before calling the IMessage.Send method, CDO uses the IMessage.Sender property instead. If neither From and Sender are set before calling the Send method, an exception is raised. Either or both the From or Sender property must be set prior to sending a message. If you do not set From before calling the Post method, an exception is raised; the Sender property is not used for NNTP.
The distinction between the From and Sender properties is that Sender represents the messaging user that actually submits the message, while From designates its principal author(s). If these are the same messaging user, it is only necessary to set From, and it is recommended to leave Sender unset in this case.