Gets the mailer parameters when sending email to this user.

@return array
551036
protected function getMailerParams()
    {
        $app = $this->getApp();

        return [
            'base_url' => $app['base_url'],
            'siteEmail' => $app['config']->get('app.email'),
            'email' => $this->email,
            'username' => $this->name(true),
            'to' => [
                [
                    'email' => $this->email,
                    'name' => $this->name(true),
                ],
            ],
        ];
    }
477554
protected function getMailer()
    {
        $mailer = new \PHPMailer();
        
        $SMTPConfig = $this->getOption(self::CONFIG_SMTP_CONFIG);
        
        $mailer->IsSMTP();
        $mailer->SMTPKeepAlive = true;
        $mailer->Debugoutput = 'error_log';
        
        $mailer->Host = $SMTPConfig['SMTP_HOST'];
        $mailer->Port = $SMTPConfig['SMTP_PORT'];
        $mailer->Username = $SMTPConfig['SMTP_USER'];
        $mailer->Password = $SMTPConfig['SMTP_PASS'];
        
        if (isset($SMTPConfig['DEBUG_MODE'])) {
            $mailer->SMTPDebug = $SMTPConfig['DEBUG_MODE'];
        }
        if (isset($SMTPConfig['Mailer'])) {
            $mailer->Mailer = $SMTPConfig['Mailer'];
        }
        if (isset($SMTPConfig['SMTP_AUTH'])) {
            $mailer->SMTPAuth = $SMTPConfig['SMTP_AUTH'];
        }
        if (isset($SMTPConfig['SMTP_SECURE'])) {
            $mailer->SMTPSecure = $SMTPConfig['SMTP_SECURE'];
        }
        
        return $mailer;
    }
836644
public function getTo()
    {
        $recipients = [];
        foreach ($this->message->getTo() as $email => $name) {
            $recipients[] = new Email($email, $name);
        }

        return $recipients;
    }
591805
public function getParams(): array
    {
        $params = [
            'chat_id' => $this->chatId,
            'from_chat_id' => $this->fromChatId,
            'message_id' => $this->messageId
        ];

        if ($this->disableNotification) {
            $params['disable_notification'] = (int)$this->disableNotification;
        }

        return $params;
    }
193995
public function getParams()
    {
        $params = array(
            'compilation_level' => $this->getMode(),
            'output_format'     => 'xml',
            'warning_level'     => $this->getWarningLevel(),
            'output_info_1'     => 'compiled_code',
            'output_info_2'     => 'statistics',
            'output_info_3'     => 'warnings',
            'output_info_4'     => 'errors',
        );

        $formattingOptions = $this->getFormattingOptions();

        if ($formattingOptions->getPrettyPrintEnabled()) {
            $params['formatting'] = 'pretty_print';
        }

        if ($formattingOptions->getPrintInputDelimiterEnabled()) {
            $params['formatting'] = 'print_input_delimiter';
        }

        if (count($this->scripts) > 0) {
            $params['js_code'] = implode("\n\n", $this->scripts);
        }

        foreach ($this->files as $key => $file) {
            $params['code_url_' . $key] = $file;
        }

        return $params;
    }
335878
public function getMailParameters(NotificationEntity $notification, UserInfo $recipient)
    {
        $notificationData = $notification->getNotificationData();
        $locale = $this->app->make(LocaleRepository::class)->find($notificationData['localeID']);
        if ($locale === null) {
            throw new Exception(t('Unable to find the locale with ID %s', $notificationData['localeID']));
        }
        $requestedBy = $locale->getRequestedBy();

        return [
            'requestedBy' => $requestedBy,
            'localeName' => $locale->getDisplayName(),
            'teamsUrl' => $this->getBlockPageURL('CommunityTranslation Team List'),
            'notes' => $notificationData['notes'] ? $this->app->make('helper/text')->makenice($notificationData['notes']) : '',
        ] + $this->getCommonMailParameters($notification, $recipient);
    }
144672
protected function getRequestParameters()
    {
        if ($this->request->isMethod('POST')) {
            $parameters = $this->request->request;
        } else {
            $parameters = $this->request->query;
        }

        return $parameters;
    }
545933
protected function getEmailAddresses()
    {
        $addresses = array();
        $committer = $this->build->getCommitterEmail();

        if (isset($this->options['committer']) && !empty($committer)) {
            $addresses[] = $committer;
        }

        if (isset($this->options['addresses'])) {
            foreach ($this->options['addresses'] as $address) {
                $addresses[] = $address;
            }
        }

        if (empty($addresses) && isset($this->options['default_mailto_address'])) {
            $addresses[] = $this->options['default_mailto_address'];
        }

        return array_unique($addresses);
    }
1310382
public function getSender()
    {
        $sender = $this->createSender();

        $sender->setFrom($this->fromEmail, $this->fromName);

        if ($this->replyToEmail) {
            $sender->setReplyTo($this->replyToEmail);
        }

        return $sender;
    }
571464
public function get_url_params() {
        $args = array(
            'id' => $this->course->id
        );
        if (!empty($this->instancefilter)) {
            $args['ifilter'] = $this->instancefilter;
        }
        if (!empty($this->rolefilter)) {
            $args['role'] = $this->rolefilter;
        }
        if ($this->searchfilter !== '') {
            $args['search'] = $this->searchfilter;
        }
        if (!empty($this->groupfilter)) {
            $args['filtergroup'] = $this->groupfilter;
        }
        if ($this->statusfilter !== -1) {
            $args['status'] = $this->statusfilter;
        }
        return $args;
    }
1352842
public function getParams(): array
    {
        $params = [
            'chat_id' => $this->chatId,
            'audio' => $this->audio,
        ];

        if ($this->disableNotification !== null) {
            $params['disable_notification'] = (int)$this->disableNotification;
        }

        if ($this->replyToMessageId) {
            $params['reply_to_message_id'] = $this->replyToMessageId;
        }

        return $params;
    }
243350
public function getWrongEmailUsers()
    {
        if (version_compare($this->appbox->get_version(), '3.9', '>=')) {
            return [];
        }

        $builder = $this->appbox->get_connection()->createQueryBuilder();
        /** @var Statement $stmt */
        $stmt = $builder
            ->select('u.usr_mail', 'u.usr_id', 'u.last_conn', 'u.usr_login')
            ->from($this->table, 'u')
            ->where($builder->expr()->isNotNull('u.usr_mail'))
            ->execute()
        ;
        $rs = $stmt->fetchAll(\PDO::FETCH_ASSOC);
        $stmt->closeCursor();

        $users = [];

        foreach ($rs as $row) {
            if (!isset($users[$row['usr_mail']])) {
                $users[$row['usr_mail']] = [];
            }

            $users[$row['usr_mail']][] = $row;
        }

        $badUsers = [];

        foreach ($users as $email => $usrs) {
            if (count($usrs) > 1) {
                $badUsers[$email] = [];
                foreach ($usrs as $usrInfo) {
                    $badUsers[$email][$usrInfo['usr_id']] = $usrInfo;
                }
            }
        }

        unset($users);

        return $badUsers;
    }
1054027
public function getMailer()
    {
        if(is_null($this->mailer))
        {
            if (isset($this->config['type']) && $this->config['type'] == 'smtp') {
                $transport = \Swift_SmtpTransport::newInstance($this->config['smtp_options']['host'], $this->config['smtp_options']['port']);
                $transport->setUsername($this->config['smtp_options']['connection_config']['username']);
                $transport->setPassword($this->config['smtp_options']['connection_config']['password']);
            } else {
                $transport = \Swift_MailTransport::newInstance();
            }
            
            $this->mailer = \Swift_Mailer::newInstance($transport);
            $this->mailer_logger = new \Swift_Plugins_Loggers_ArrayLogger();
            $this->mailer->registerPlugin(new \Swift_Plugins_LoggerPlugin($this->mailer_logger));
        }
        
        return $this->mailer;
    }
504287
public function getUserEmails()
    {
        $project = $this->getProject();
        if (!$project) {
            return [];
        }

        $emails = [];
        foreach ($this->api->getProjectAccesses($project) as $projectAccess) {
            $account = $this->api->getAccount($projectAccess);
            $emails[] = $account['email'];
        }

        return $emails;
    }
1343740
public function getParams()
    {
        $result = $this->overriddenParams + parent::getParams();
        // Forward the connection charset/collate to the default table options
        if (!isset($result['defaultTableOptions']['charset']) && !isset($result['defaultTableOptions']['collate'])) {
            if (isset($result['character_set']) && isset($result['collation'])) {
                if (!isset($result['defaultTableOptions'])) {
                    $result['defaultTableOptions'] = [];
                }
                $result['defaultTableOptions']['charset'] = $result['character_set'];
                $result['defaultTableOptions']['collate'] = $result['collation'];
            }
        }

        return $result;
    }
420593
protected function getParams()
    {
        $reserved = [
            $this->config('prefix', '').'sort',
            $this->config('prefix', '').'fields',
            $this->config('prefix', '').'limit',
            $this->config('prefix', '').'with',
            $this->config('prefix', '').'page',
        ];

        return $this->params ?: $this->request->except($reserved);
    }
559378
public function getMailer()
    {
        if ($this->_mailer === null) {
            $this->_mailer = new PHPMailer();
            $this->_mailer->CharSet = 'UTF-8';
            $this->_mailer->From = $this->from;
            $this->_mailer->FromName = $this->fromName;
            $this->_mailer->isHTML(true);
            $this->_mailer->XMailer = ' ';
            // if sending over smtp, define the settings for the smpt server
            if ($this->isSMTP) {
                if ($this->debug) {
                    $this->_mailer->SMTPDebug = 2;
                }
                $this->_mailer->isSMTP();
                $this->_mailer->SMTPSecure = $this->smtpSecure;
                $this->_mailer->Host = $this->host;
                $this->_mailer->SMTPAuth= $this->smtpAuth;
                $this->_mailer->Username = $this->username;
                $this->_mailer->Password = $this->password;
                $this->_mailer->Port = $this->port;
                $this->_mailer->SMTPOptions = [
                    'ssl' => ['verify_peer' => false, 'verify_peer_name' => false, 'allow_self_signed' => true],
                ];
            }
        }

        return $this->_mailer;
    }