update lock clucknut
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 14s
Build, Push and Deploy / build-and-push (push) Successful in 3m14s
Build, Push and Deploy / deploy-staging (push) Successful in 25s
Build, Push and Deploy / deploy-production (push) Has been skipped

This commit is contained in:
2026-04-18 20:32:18 +07:00
parent 4554035227
commit dcaf267458
3359 changed files with 153185 additions and 205489 deletions

View File

@@ -5,24 +5,10 @@
use Safe\Exceptions\MailparseException;
/**
* Extracts/decodes a message section from the supplied filename.
*
* The contents of the section will be decoded according to their transfer
* encoding - base64, quoted-printable and uuencoded text are supported.
*
* @param resource $mimemail A valid MIME resource, created with
* mailparse_msg_create.
* @param mixed $filename Can be a file name or a valid stream resource.
* @param callable $callbackfunc If set, this must be either a valid callback that will be passed the
* extracted section, or NULL to make this function return the
* extracted section.
*
* If not specified, the contents will be sent to "stdout".
* @return string If callbackfunc is not NULL returns TRUE on
* success.
*
* If callbackfunc is set to NULL, returns the
* extracted section as a string.
* @param resource $mimemail
* @param mixed $filename
* @param callable $callbackfunc
* @return string
* @throws MailparseException
*
*/
@@ -42,11 +28,7 @@ function mailparse_msg_extract_part_file($mimemail, $filename, ?callable $callba
/**
* Frees a MIME resource.
*
* @param resource $mimemail A valid MIME resource allocated by
* mailparse_msg_create or
* mailparse_msg_parse_file.
* @param resource $mimemail
* @throws MailparseException
*
*/
@@ -61,15 +43,8 @@ function mailparse_msg_free($mimemail): void
/**
* Parses a file.
* This is the optimal way of parsing a mail file that you have on disk.
*
* @param string $filename Path to the file holding the message.
* The file is opened and streamed through the parser.
*
* The message contained in filename is supposed to end with a newline
* (CRLF); otherwise the last line of the message will not be parsed.
* @return resource Returns a MIME resource representing the structure.
* @param string $filename
* @return resource
* @throws MailparseException
*
*/
@@ -85,14 +60,8 @@ function mailparse_msg_parse_file(string $filename)
/**
* Incrementally parse data into the supplied mime mail resource.
*
* This function allow you to stream portions of a file at a time, rather
* than read and parse the whole thing.
*
* @param resource $mimemail A valid MIME resource.
* @param string $data The final chunk of data is supposed to end with a newline
* (CRLF); otherwise the last line of the message will not be parsed.
* @param resource $mimemail
* @param string $data
* @throws MailparseException
*
*/
@@ -107,13 +76,9 @@ function mailparse_msg_parse($mimemail, string $data): void
/**
* Streams data from the source file pointer, apply
* encoding and write to the destination file pointer.
*
* @param resource $sourcefp A valid file handle. The file is streamed through the parser.
* @param resource $destfp The destination file handle in which the encoded data will be written.
* @param string $encoding One of the character encodings supported by the
* mbstring module.
* @param resource $sourcefp
* @param resource $destfp
* @param string $encoding
* @throws MailparseException
*
*/