@MimePartGet
Syntax
@MimePartGet(MIMEPART1;FNSEGMENTNR2;FNFLAGS3;FNPARTTYPE4;FNVERSION5;MIMEBOUNDARY6;MIMEHEADERS7;MIMEBODY8);
Description
Returns information about a MIMEPART segment of HUGEMIMEPART MIMEPART1.
FN FNSEGMENTNR2
Return FN FNFLAGS3
Flag Hex Dec Kommentar
MIME_PART_HAS_BOUNDARY 0001 00001
MIME_PART_HAS_HEADERS 0002 00002
MIME_PART_BODY_IN_DBOBJECT 0004 00004
MIME_PART_SHARED_DBOBJECT 0008 00008 Used only with MIME_PART_BODY_IN_DBOBJECT.
MIME_PART_SKIP_FOR_CONVERSION 0010 00016 only used during MIME->CD conversion
Return FN FNPARTTYPE4:
The type of the MIMEPART body is returned in this parameter.
MIME_PART_PROLOG 0001 00001
MIME_PART_BODY 0002 00002
MIME_PART_EPILOG 0003 00003
MIME_PART_RETRIEVE_INFO 0004 00004
MIME_PART_MESSAGE 0005 00005
Return FN FNVERSION5:
The version of the MIMEPART body is returned in this parameter.
Currently only version 2 is allowed!
Return TEXT MIMEBOUNDARY6:
The boundary string of the MIMEPART segment is returned in this parameter.
The boundary string is a more or less random string, but it should be unique and must not occur in the actual data so that it can be used as a delimiter.
A boundary string is terminated with "\X0D\0A"!
According to the RFC definition:
The boundary string is introduced with "–" for all parts, and in the epilogue the boundary string is terminated with "–" (before the final "\X0D\0A"; see the last segment in the example below!).
A segment does not necessarily have to contain a boundary string!
Return TEXT MIMEHEADERS7:
The header lines of the MIMEPART segment are returned in this parameter.
The header lines may contain various information about the body or, for example, define the boundary string.
A segment does not necessarily have to contain header lines!
Return TEXT MIMEBODY8:
The actual body of the MIMEPART segment is returned in this parameter.
The body may contain the default text for non-HTML mail clients, or the reference to the attachment in the document with the HTML text (mime.htm) for HTML mail clients.
A segment does not necessarily have to contain a body!
The return value of the function is True on success.
Example MimePartGet(MIMEPART1;FNSEGMENTNR2;FNFLAGS3;FNPARTTYPE4;FNVERSION5;MIMEBOUNDARY6;MIMEHEADERS7;MIMEBODY8);
/*Create a typical MimePart field:*/
MIMEPART1:=@HugeMimePart;
Version:=2;
Flags:=2;
PartType:=1;
MimeBoundary:="";
MIMEPART1:=@MimePartAdd(MIMEPART1;Flags;PartType;Version;MimeBoundary;MimeHeaders;MimeBody);
/*The data of the following segment is retrieved again in the example below.*/
Flags:=3;
PartType:=2;
MimeBoundary:="\X0D\X0A–_———-=_MCPart_1267956056\X0D\X0A";
MimeHeaders:="Content-Transfer-Encoding: quoted-printable\X0D\X0AContent-Type: text/plain; charset=\"utf-8\"; format=\"fixed\"\X0D\X0A\X0D\X0A";
MIMEPART1:=@MimePartAdd(MIMEPART1;Flags;PartType;Version;MimeBoundary;MimeHeaders;MimeBody);
Flags:=15;
PartType:=2;
MimeBoundary:="\X0D\X0A–_———-=_MCPart_1267956056\X0D\X0A";
MimeHeaders:="Content-Transfer-Encoding: 8bit\X0D\X0AContent-Type: text/html; charset=\"utf-8\"\X0D\X0A\X0D\X0A";
MIMEPART1:=@MimePartAdd(MIMEPART1;Flags;PartType;Version;MimeBoundary;MimeHeaders;MimeBody);
Flags:=1;
PartType:=3;
MimeBoundary:="\X0D\X0A–_———-=_MCPart_1267956056–\X0D\X0A";
MimeHeaders:="";
MIMEPART1:=@MimePartAdd(MIMEPART1;Flags;PartType;Version;MimeBoundary;MimeHeaders;MimeBody);
FNSEGMENTNR2:=2
Ret:=@MimePartGet(MIMEPART1;FNSEGMENTNR2;FNFLAGS3;FNPARTTYPE4;FNVERSION5;MIMEBOUNDARY6;MIMEHEADERS7;MIMEBODY8);
A typical MIMEPART field is created and the data of the second segment is retrieved again using @MimePartGet retrieved again.
Note : This text was machine-translated and may contain inaccuracies.
