Add Recipient
@param string $email Email Address
@param string $name Recipient Name
@param array $details Recipient Details
@return void
431404
public function addRecipient ($email, $name = null, $details = array ())
    {

        // Add email and name to details

        $details['email']       = $email;
        $details['name']        = $name;

        // Add the recipient

        $this->_recipients[]    = $details;

    }
1096983
public function addInputEmail(string $name) : Element\Input\Email
    {
        $input = new Element\Input\Email($this, $name);
        $this->addComponent($name, $input);

        return $input;
    }
1142124
public function address($email, $name = null)
    {
        $this->getMailer()->addAddress($email, (empty($name)) ? $email : $name);

        return $this;
    }
239112
public function addCC( $email )
    {
        if ( is_array( $email ) )
        {
            $this->mailer->addCC( $email[ 'email' ], $email[ 'name' ] );
        }
        else
        {
            $this->mailer->addCC( $email );
        }
    }
1170711
protected function sendMessage($name, $email, $quote)
    {
        $mail = [
            'email'    => $this->email,
            'subject'  => $this->name.' - New Message',
            'platform' => $this->name,
            'url'      => $this->home,
            'contact'  => $email,
            'name'     => $name,
            'quote'    => $quote,
        ];

        $this->mail->queue('contact::message', $mail, function ($message) use ($mail) {
            $message->to($mail['email'])->subject($mail['subject']);
        });
    }
719645
public function cc(string $email, ?string $name = null)
  {
    $this->cc[] = ['email' => $email, 'name' => $name];
    return $this;
  }
80879
public function addReplyTo($email, $name = null)
    {
        $this->getMailer()->addReplyTo($email, empty($name) ? $email : $name);
        
        return $this;
    }
189259
public function setSender(
        $name,
        $email = null,
        $areaCode = null,
        $number = null,
        $documentType = null,
        $documentValue = null
    ) {
        $param = $name;
        if (is_array($param)) {
            $this->sender = new PagSeguroSender($param);
        } elseif ($param instanceof PagSeguroSender) {
            $this->sender = $param;
        } else {
            $sender = new PagSeguroSender();
            $sender->setName($param);
            $sender->setEmail($email);
            $sender->setPhone(new PagSeguroPhone($areaCode, $number));
            $sender->addDocument($documentType, $documentValue);
            $this->sender = $sender;
        }
    }
784060
public function setFrom($email, $name = '')
    {
        if (empty($email)) {
            throw new MailerException('email is required for setFrom!');
        }

        if (empty($name)) {
            $name = substr($email, 0, strrpos($email, '@'));
        }

        if (is_null($this->from)) {
            $this->from = [$email, $name];
        } else {
            throw new MailerException('Sender has already been set!');
        }

        return $this;
    }
78300
protected function _formatAddress($email, $name)
    {
        if ($name === '' || $name === null || $name === $email) {
            return $email;
        } else {
            $encodedName = $this->_encodeHeader($name);
            if ($encodedName === $name  &&  strcspn($name, '()<>[]:;@\\,') != strlen($name)) {
                $format = '"%s" <%s>';
            } else {
                $format = '%s <%s>';
            }
            return sprintf($format, $encodedName, $email);
        }
    }
638123
function setSender( $email, $name = false )
    {
        $this->Mail->from = new ezcMailAddress( $email, $name, $this->usedCharset() );
        $this->From = array( 'name' => $name,
                             'email' => $email );
    }
1067918
public function from(string $email, string $name = null)
    {
        $this->fromEmail = $email;
        $this->fromName = $name;

        return $this;
    }
95439
public function setSender(string $email, string $displayName = null) : void
    {
        $this->sender = new Identity($email, $displayName);
    }
817652
public function send(\BearFramework\Emails\Email $email): void
    {
        $app = App::get();
        $email = clone($email);

        if ($this->hasEventListeners('beforeSendEmail')) {
            $eventDetails = new \BearFramework\Emails\BeforeSendEmailEventDetails($email);
            $this->dispatchEvent('beforeSendEmail', $eventDetails);
            if ($eventDetails->preventDefault) {
                return;
            }
        }

        if (empty($this->senders)) {
            throw new \Exception('No email senders added.');
        }

        foreach ($this->senders as $sender) {
            if (is_callable($sender)) {
                $sender = call_user_func($sender);
            }
            if (is_string($sender)) {
                $sender = new $sender();
            }
            if ($sender instanceof \BearFramework\Emails\ISender) {
                if ($sender->send($email)) {
                    if ($this->hasEventListeners('sendEmail')) {
                        $eventDetails = new \BearFramework\Emails\SendEmailEventDetails($email);
                        $this->dispatchEvent('sendEmail', $eventDetails);
                    }
                    return;
                }
            }
        }
        throw new \Exception('No email sender is capable of sending the email provided.');
    }
316700
public function route($name, $details = [])
    {
        $this->route     = route($name, $details);
        $this->routeName = $name;

        return $this;
    }
1358742
public function send($email, $name = null, $subject, $body, $attachment = null, $bcc = null)
    {
        $this->phpMailer->isSMTP();
        $this->phpMailer->Host = $this->app->config->getMail('host');
        $this->phpMailer->SMTPAuth = true;
        $this->phpMailer->Username = $this->app->config->getMail('username');
        $this->phpMailer->Password = $this->app->config->getMail('password');
        $this->phpMailer->SMTPSecure = $this->app->config->getMail('encryption');
        $this->phpMailer->Port = $this->app->config->getMail('port');

        $this->phpMailer->From = $this->app->config->getMail('from.email');
        $this->phpMailer->FromName = $this->app->config->getMail('from.name');

        $this->phpMailer->addAddress($email, $name);

        $this->phpMailer->addReplyTo(
                                $this->app->config->getMail('reply.email'),
                                $this->app->config->getMail('mail.reply.name')
                            );

        $this->phpMailer->addBCC($bcc);

        $this->phpMailer->addAttachment($attachment);

        $this->phpMailer->isHTML(true);

        $this->phpMailer->Subject = $subject;
        $this->phpMailer->Body    = $body;

        /**
         * If log set to true
         * then log email
         */
        if ($this->app->config->getMail('log') == true) return $this->logEmail($body);

        /**
         * If log set to false
         * then send email
         */
        if ( $this->app->config->getMail('log') !== true)
        {
            try
            {
                set_time_limit(0);

                if( ! $this->phpMailer->send()) throw new MailerException($this->phpMailer->ErrorInfo);

                else return true;
            }
            catch(phpmailerException  $e)
            {
                throw new MailerException($e->errorMessage());
            }
        }
    }
496411
public function bccAddress($email, $name = null)
    {
        $this->getMailer()->addBCC($email, (empty($name)) ? $email : $name);

        return $this;
    }