Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/rentpix.corals.io/vendor/zbateson/mail-mime-parser/src/Header/Part/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/rentpix.corals.io/vendor/zbateson/mail-mime-parser/src/Header/Part/AddressPart.php
<?php
/**
 * This file is part of the ZBateson\MailMimeParser project.
 *
 * @license http://opensource.org/licenses/bsd-license.php BSD
 */

namespace ZBateson\MailMimeParser\Header\Part;

use ZBateson\MbWrapper\MbWrapper;

/**
 * Holds a single address or name/address pair.
 *
 * The name part of the address may be mime-encoded, but the email address part
 * can't be mime-encoded.  Any whitespace in the email address part is stripped
 * out.
 *
 * A convenience method, getEmail, is provided for clarity -- but getValue
 * returns the email address as well.
 *
 * @author Zaahid Bateson
 */
class AddressPart extends ParameterPart
{
    /**
     * Performs mime-decoding and initializes the address' name and email.
     *
     * The passed $name may be mime-encoded.  $email is stripped of any
     * whitespace.
     *
     */
    public function __construct(MbWrapper $charsetConverter, string $name, string $email)
    {
        parent::__construct(
            $charsetConverter,
            $name,
            ''
        );
        // can't be mime-encoded
        $this->value = $this->convertEncoding($email);
    }

    /**
     * Returns the email address.
     *
     * @return string The email address.
     */
    public function getEmail() : string
    {
        return $this->value;
    }
}

Spamworldpro Mini