Ejemplo delphi:
---------------------------
nota: requiere el use TIdText;
for x := 0 to TheMsg.MessageParts.Count - 1 do
begin
if TheMsg.MessageParts.Items[x] is TIdText then
BodyMsg := BodyMsg+ TIdText(TheMsg.MessageParts.Items[x]).Body.Text;
end;
TIdText
Encapsulates a MIME-encoded text message part. TIdText = class(TIdMessagePart) Class Hierarchy
TCollectionltem TIdMessagePart TIdText [CI
Unit
IdMessage [CI TIdText Members Properties
Body
Textual content of the message part. Methods
^Assign Create
Copy the property values of an object instance. Constructor for the collection item.
^ Destroy Frees the object instance.
Legend
^virtual
Description
TIdText is a TIdMessagePart [C] descendant that encapsulates a MIME textual message part. TldAttachment [C] and TIdText are Created with Doc-O-Matic 2 donated to Project JEDI. Commercial license available from the Doc-O-Matic site.
used as collection items in a TldMessageParts [C] collection.
TldText provides the Body [C] property to represent the textual content of the message part. See Also
TldMessagePart[C], Technical Support [CI
Textual content of the message part. property Body: TStrings; Description
Body is a TStrings property that represents the textual content of the MIME message part. Body will be populated with the values from a valid TStrings instance supplied in the Create [C] constructor. Body may also be updated using inherited properties and methods from TStrings, like Text and Add.
See Also
TldText.Create [C]
No hay comentarios:
Publicar un comentario