2 // This file is part of Moodle - http://moodle.org/
4 // Moodle is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
9 // Moodle is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
14 // You should have received a copy of the GNU General Public License
15 // along with Moodle. If not, see <http://www.gnu.org/licenses/>.
17 namespace tool_messageinbound
;
20 * The Mail Pickup Utils.
22 * @package tool_messageinbound
23 * @copyright 2023 Huong Nguyen <huongnv13@gmail.com>
24 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
28 /** @var int Encoding type: 7 bit SMTP semantic data. */
30 /** @var int Encoding type: 8 bit SMTP semantic data. */
32 /** @var int Encoding type: 8 bit binary data. */
34 /** @var int Encoding type: BASE64 encoded data. */
36 /** @var int Encoding type: Human-readable 8-as-7 bit data. */
37 const ENCQUOTEDPRINTABLE
= 4;
38 /** @var int Encoding type: Unknown. */
42 * Get body content encoding.
44 * @return string[] List of body content encoding.
46 public static function get_body_encoding(): array {
48 self
::ENC7BIT
=> '7BIT',
49 self
::ENC8BIT
=> '8BIT',
50 self
::ENCBINARY
=> 'BINARY',
51 self
::ENCBASE64
=> 'BASE64',
52 self
::ENCQUOTEDPRINTABLE
=> 'QUOTED-PRINTABLE',
53 self
::ENCOTHER
=> 'X-UNKNOWN',