MmsGetHeaderString Function

Action

Retrieves the specified header of a MMS. If the header is not a string type header, use MmsGetHeader instead.

Include file

MmsLib.bdh

Syntax

MmsGetHeaderString( in  hMms      : number,
                    in  nHeader   : number,
                    out sValue    : string,
                    in  nMaxValue : number optional,
                    out nCopied   : number optional ): boolean;

Return value

  • true if successful

  • false otherwise

Parameter Description
hMms Handle for the MMS, returned by a call to MmsCreateMms.
nHeader One of the following constants:
  • MMS_HEADER_Bcc
  • MMS_HEADER_Cc
  • MMS_HEADER_ContentLocation
  • MMS_HEADER_From
  • MMS_HEADER_MsgId
  • MMS_HEADER_Subject
  • MMS_HEADER_To
  • MMS_HEADER_TransactionId
sValue Variable that retrieves the value of the specified header. Based on the specified header type, the returned string specifies one of the following:
  • MMS_HEADER_Bcc: An MMS address (phone number, e-mail address, IP address).
  • MMS_HEADER_Cc: An MMS address (phone number, e-mail address, IP address).
  • MMS_HEADER_ContentLocation: Content location of the MMS.
  • MMS_HEADER_From: An MMS address (phone number, e-mail address, IP address).
  • MMS_HEADER_MsgId: The message ID.
  • MMS_HEADER_Subject: The message subject.
  • MMS_HEADER_To: An MMS address (phone number, e-mail address, IP address).
  • MMS_HEADER_TransactionId: The transaction ID.
nMaxValue Optional: Maximum length of the string that can be returned. This value must be less than or equal to the size of the string variable sValue.
nCopied Optional: Variable receiving the number of actually copied bytes.

Example

dcltrans
  transaction TWap
  var
    sData   : string(0x10000);
    nData   : number;
    hMms    : number;
    sFrom   : string;
  begin
    nData := WapGetContent(sData);
    MmsCreateMms(hMms);
    MmsParseMms(hMms, sData, nData, true);
    MmsGetHeaderString(hMms, MMS_HEADER_From, sFrom);
    MmsDeleteMms(hMms);
    print(sFrom);
  end TWap;