mimeEntityGetMessageFilename

SYNOPSIS

varchar mimeEntityGetMessageFilename(mimeEntity entityOrReader)

Parameters:

  • entityOrReader - A mimeEntity or mimeReader object

Returns:

  • varchar filename for the entity, as specified in the message


DESCRIPTION
The mimeEntityGetMessageFilename function returns the filename for the entity, as specified in the message, or empty string if none. Note that this filename may contain a full or partial path, may use unsafe characters, may be missing (empty), and/or may not be unique within the message. Thus the mimeEntityGetSafeFilename function (here) is recommended instead.

The message filename is the first value found from the following sources:

  1. Path part of Content-Location URL

  2. Content-Type name parameter

  3. Content-Disposition filename parameter


EXAMPLE

<$ret = (mimeEntityGetMessageFilename($reader))>
  Original filename: $ret


CAVEATS
The returned filename may not be safe for local filesystem use. Use mimeEntityGetSafeFilemame (here) instead.


SEE ALSO
mimeEntityGetSafeFilename


Copyright © Thunderstone Software     Last updated: Apr 15 2024
Copyright © 2024 Thunderstone Software LLC. All rights reserved.