Get the currently configured email address.

@return string
764763
protected function _get_email_address() {
		$current = $this->store->get( 'email_address' );

		// Might be null or an empty string...
		if ( ! $current ) {
			$current = get_bloginfo( 'admin_email' );
		}

		return trim( (string) $current );
	}
1177915
public function getMailer() {
		if ($this->mailer === null) {
			$prefs = $this->getPreferenceLoader()->getSystemPreferences();
			switch ($prefs->getMailTransport()) {
				case SystemPreferences::MAIL_TRANSPORT_SMTP:
					$transport = new Swift_SmtpTransport($prefs->getSmtpServer(), $prefs->getSmtpPort());
					$transport->setUsername($prefs->getSmtpUsername());
					$transport->setPassword($prefs->getSmtpPassword());
					$encryption = $prefs->getSmtpEncryption();
					if ($encryption != SystemPreferences::SMTP_ENCRYPTION_NONE) {
						$transport->setEncryption($encryption);
					}
					break;

				case SystemPreferences::MAIL_TRANSPORT_SENDMAIL:
					$transport = new Swift_SendmailTransport($prefs->getSendmail());
					break;

				case SystemPreferences::MAIL_TRANSPORT_MAIL:
				default:
					$transport = new Swift_MailTransport();
					break;
			}

			$this->mailer = new Swift_Mailer($transport);
		}

		return $this->mailer;
	}
1004894
public function getAddress()
    {
        $isUnix = $this->getAddressType() === AF_UNIX;

        $address = array();
        $address['transport'] = $this->getTransport() . ( $isUnix ? ':///' : '://' );
        $address['target']    = $this->getTarget();
        $address['port']      = ( $isUnix ? '' : ':' ) . $this->getTargetPort();

        return implode('', $address);
    }
704654
public function getEmail() {
		if (isset($_SESSION) && isset($_SESSION[self::SESSION_FIELD_EMAIL])) {
			return $_SESSION[self::SESSION_FIELD_EMAIL];
		}
		else {
			return null;
		}
	}
1329698
public function getFromAddress()
    {
        // get sender address
        $headers = $this->message->headers();
        $from    = rcube_mime::decode_address_list($headers['From'], 1, false, null, true);
        $from    = $from[1];

        return $from;
    }
396623
protected function get_mailbox() {
        // Get the current mailbox.
        $mailbox = $this->client->currentMailbox();

        if (isset($mailbox['mailbox'])) {
            return $mailbox['mailbox'];
        } else {
            throw new \core\message\inbound\processing_failed_exception('couldnotopenmailbox', 'tool_messageinbound');
        }
    }
449618
public function getAddress() : ?string 
    {
        if ( ! $this->hasAddress()) {
            $this->setAddress($this->getDefaultAddress());
        }
        return $this->address;
    }
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;
    }
957998
protected function GetUserAddressData()
    {
        $aUserAddressData = parent::GetUserAddressData();
        $oActiveUser = TdbDataExtranetUser::GetInstance();
        if ($oActiveUser) {
            $oBillingAddress = $oActiveUser->GetBillingAddress();
            if ($oBillingAddress) {
                $aUserAddressData['addr_name'] = $oBillingAddress->fieldFirstname.' '.$oBillingAddress->fieldLastname;
            }
        }

        return $aUserAddressData;
    }
1249816
public function getEmailResetPassword()
    {
        if ($this->offsetExists('email') && isset($this->email['resetPasswordTemplate'])) {
            return (string) $this->email['resetPasswordTemplate'];
        }
        return false;
    }
1319843
public function current()
    {
        if (!$this->valid()) {
            return null;
        }

        $ob = $this->_data[$this->_ptr['idx']];

        return is_null($this->_ptr['subidx'])
            ? $ob
            : $ob->addresses[$this->_ptr['subidx']];
    }
414156
public function getMacAddress()
    {
        switch (PHP_OS) {
            default:
            case 'Darwin':
            case 'FreeBSD':
                $cmd = '/sbin/ifconfig';
                break;
            case 'Windows':
                $cmd = "ipconfig /all ";
                break;
        }

        $string = trim(shell_exec($cmd));

        if (preg_match_all('/([0-9a-f]{2}:){5}\w\w/i', $string, $matches)) {
            if (isset($matches[ 0 ])) {
                return reset($matches[ 0 ]); // get first mac address
            }
        } else {
            return implode(':', str_split(substr(md5('none'), 0, 12), 2));
        }
    }
1302952
public function getNotificationEmail(): string
    {
        if ($this->userMeta->notification_email !== null && $this->userMeta->notification_email !== '') {
            return $this->userMeta->notification_email;
        }
        return $this->email;
    }
29043
protected function getEmail(): AbstractMailAdapter
    {
        if (isset($this->config[self::FN_CONFIG_KEY])) {
            $mail = call_user_func($this->config[self::FN_CONFIG_KEY], $this->messages);

            if (!($mail instanceof AbstractMailAdapter)) {
                throw new Exception('Function defined in mail config under ' . self::FN_CONFIG_KEY . ' must return instance of \Koldy\Mail\Adapter\AbstractMailAdapter; ' . gettype($mail) . ' given');
            }

            return $mail;
        }

        if (count($this->messages) == 0) {
            throw new Exception('Can not prepare e-mail instance when there\'s no log messages added from before; try not to call getEmail() if messages array is empty');
        }

        $mail = Mail::create($this->config['adapter']);
        $allMessages = [];
        $firstMessage = $this->messages[0];

        foreach ($this->messages as $msg) {
            $allMessages[] = $msg->getDefaultLine();
        }

        $body = implode("\n", $allMessages);

        $level = strtoupper($firstMessage->getLevel());
        $subject = "[{$level}] {$firstMessage->getMessage()}";

        $body .= "\n\n----------\n";
        $body .= Server::signature();
        $subject = Util::truncate($subject, 140);
        $domain = Application::getDomain();

        $mail->from('alert@' . $domain, $domain)->subject($subject)->body($body);

        $to = $this->config['to'];
        if (!is_array($this->config['to']) && strpos($this->config['to'], ',') !== false) {
            $to = explode(',', $this->config['to']);
        }

        if (is_array($to)) {
            foreach ($to as $toEmail) {
                $mail->to(trim($toEmail));
            }
        } else if (is_string($to)) {
            $mail->to(trim($to));
        } else {
            throw new Exception('Unable to prepare log via email, expected array or string for \'to\', got ' . gettype($to));
        }

        return $mail;
    }
504374
protected function sendActivationEmail()
    {
        $forum = Podium::getInstance()->podiumConfig->get('name');
        $email = Content::fill(Content::EMAIL_REGISTRATION);
        if ($email !== false) {
            $link = Url::to(['account/activate', 'token' => $this->activation_token], true);
            return Email::queue(
                $this->email,
                str_replace('{forum}', $forum, $email->topic),
                str_replace('{forum}', $forum, str_replace('{link}',
                    Html::a($link, $link), $email->content)),
                !empty($this->id) ? $this->id : null
            );
        }
        return false;
    }
660657
public function getEmail()
    {
        $oHttpCodes = Factory::service('HttpCodes');

        if (!userHasPermission('admin:auth:accounts:browse')) {
            throw new ApiException(
                'You are not authorised to browse users',
                $oHttpCodes::STATUS_UNAUTHORIZED
            );
        }

        $oInput = Factory::service('Input');
        $sEmail = $oInput->get('email');

        if (!valid_email($sEmail)) {
            throw new ApiException(
                '"' . $sEmail . '" is not a valid email',
                $oHttpCodes::STATUS_BAD_REQUEST
            );
        }

        $oUserModel = Factory::model(static::CONFIG_MODEL_NAME, static::CONFIG_MODEL_PROVIDER);
        $oUser      = $oUserModel->getByEmail($sEmail);

        if (empty($oUser)) {
            throw new ApiException(
                'No user found for email "' . $sEmail . '"',
                $oHttpCodes::STATUS_NOT_FOUND
            );
        }

        return Factory::factory('ApiResponse', 'nails/module-api')
            ->setData($this->formatObject($oUser));
    }
537957
public function getMailFields()
    {
        $result['organization']            = $this->getName();
        $result['organization_location']   = $this->_get('gor_location');
        $result['organization_login_url']  = $this->getLoginUrl();
        $result['organization_reply_name'] = $this->_get('gor_contact_name');
        $result['organization_reply_to']   = $this->_get('gor_contact_email');
        $result['organization_signature']  = $this->getSignature();
        $result['organization_url']        = $this->_get('gor_url');
        $result['organization_welcome']    = $this->getWelcome();

        if ((APPLICATION_ENV === 'production') &&
                preg_match('#^http(s)?://localhost#', $result['organization_login_url'])) {
            throw new \Gems_Exception("Use of 'localhost' as url not permitted on production system.");
        }

        return $result;
    }