Gc\Mail::__construct PHP Method

__construct() public method

Initialize mail
public __construct ( string $encoding = null, string $message = null, string $from = null, string $to = null )
$encoding string Encoding
$message string Message
$from string From
$to string To
    public function __construct($encoding = null, $message = null, $from = null, $to = null)
    {
        if (!empty($encoding)) {
            $this->setEncoding($encoding);
        }
        if (!empty($message)) {
            $this->setBody($message);
        }
        if (!empty($from)) {
            $this->setFrom($from);
        }
        if (!empty($to)) {
            $this->addTo($to);
        }
    }