Get the sender address for this message.

@return Address|null
510689
public function getSender()
    {
        $addresses = $this->transformArrayToAddresses($this->message->getSender());

        if ($address = reset($addresses)) {
            return $address;
        }

        return null;
    }
741556
public function getUserIdByMappedEmailAddress() {

        // get the mapped recipient (valid because $this->isInboundEmailToEmailAddressMapToUser() is already done)
        $mappedRoutes = config('lasallecmsmailgun.inbound_map_mailgun_routes_with_user_email_address');

        foreach ($mappedRoutes as $route => $user) {

            // if "from" email address is the same as the route specified in the config...
            if ($this->request->input('recipient') == $route) {
                $userEmailAddress = $user;
            }
        }

        return $this->userRepository->findUserIdByEmail($userEmailAddress);
    }
61522
public function getAddressInfo()
    {
        $address = new Address();

        $address->setAddress($this->getAddress());
        $address->setPostalCode($this->getPostalCode());
        $address->setCity($this->getCity());
        if(!is_null($this->getState()))$address->setState($this->getState());
        $address->setCountry($this->getCountry());

        return $address;
    }
219347
protected function getListAddress()
    {
        $id = $this->getParam(0);

        if (!isset($id)) {
            return $this->address->getList(array('limit' => $this->getLimit()));
        }

        if ($this->getParam('user')) {
            return $this->address->getList(array('user_id' => $id, 'limit' => $this->getLimit()));
        }

        if (!is_numeric($id)) {
            $this->errorAndExit($this->text('Invalid argument'));
        }

        $result = $this->address->get($id);

        if (empty($result)) {
            $this->errorAndExit($this->text('Unexpected result'));
        }

        return array($result);
    }
1272146
static public function getAddress()
    {
        foreach (array('HTTP_X_FORWARDED_FOR', 'HTTP_CLIENT_IP', 'HTTP_X_CLIENT_IP', 'HTTP_X_CLUSTER_CLIENT_IP', 'REMOTE_ADDR') as $header) {
            if (!isset($_SERVER[$header]) || ($spoof = $_SERVER[$header]) === null) {
                continue;
            }
            sscanf($spoof, '%[^,]', $spoof);
            if (!filter_var($spoof, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) {
                $spoof = null;
            } else {
                return $spoof;
            }
        }
        return '0.0.0.0';
    }
443510
public @Nonnull String getAdminAddress() {
        String v = adminAddress;
        if(v==null)     v = Messages.Mailer_Address_Not_Configured();
        return v;
    }
1331667
public function getMessage()
    {
        if (!$this->isSuccessful() && isset($this->data['errorCode'])) {
            return $this->data['errorCode'] . ': ' . $this->data['message'];
        }

        if (!$this->isSuccessful() && isset($this->data['responseCode'])) {
            return $this->data['responseCode'] . ': ' . $this->data['responseMessage'];
        }

        return null;
    }
167540
public function getClientAddress()
    {
        $address = null;
        if ($this->getHeaderLine('X_FORWARDED_FOR') && $this->trustProxy) {
            $address = $this->getHeaderLine('X_FORWARDED_FOR');
        }

        if (is_null($address) && $this->getServer('REMOTE_ADDR')) {
            $address = $this->getServer('REMOTE_ADDR');
        }

        if ($address) {
            $addresses = explode(',', $address);
            return $addresses[0];
        }

        return '';
    }
44860
protected String getSenderEmail(Message mailMessage) throws MessagingException
    {
        Address[] addresses=mailMessage.getFrom();
        String senderEmail=null;
        if((addresses!=null)&&(addresses.length>0))
        {
            //get sender mail address (only first from is used)
            Address address=addresses[0];
            
            //get as string
            senderEmail=address.toString();
        }

        return senderEmail;
    }
312516
protected function getListAddress()
    {
        $conditions = $this->query_filter;
        $conditions['limit'] = $this->data_limit;
        $addresses = (array) $this->address->getList($conditions);

        $this->prepareListAddress($addresses);
        return $addresses;
    }
868567
protected function getMailer()
    {
        $transport = null;
        if ($this->configurationManager->getSetting('mailer.type') === 'sendmail') {
            $transport = \Swift_SendmailTransport::newInstance($this->configurationManager->getSetting('mailer.sendmailCommand'));
        } else if ($this->configurationManager->getSetting('mailer.type') === 'smtp') {
            $host = $this->configurationManager->getSetting('mailer.smtpHost');
            $port = $this->configurationManager->getSetting('mailer.smtpPort');
            $username = $this->configurationManager->getSetting('mailer.smtpUsername');
            $password = $this->configurationManager->getSetting('mailer.smtpPassword');
            
            $transport = \Swift_SmtpTransport::newInstance($host, $port);
            $transport->setUsername($username);
            $transport->setPassword($password);
        }
        
        if ($transport === null) {
            throw new Exception('No mail transport defined. Please check your configuration.');
        }

        return \Swift_Mailer::newInstance($transport);
    }
326197
protected function address()
    {
        $user = eZUser::fetch( $this->UserID );
        if ( $user instanceof eZUser )
        {
            return $user->attribute( 'email' );
        }
        return '';
    }
704654
public function getEmail() {
		if (isset($_SESSION) && isset($_SESSION[self::SESSION_FIELD_EMAIL])) {
			return $_SESSION[self::SESSION_FIELD_EMAIL];
		}
		else {
			return null;
		}
	}
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;
    }
1062570
public function getMessenger()
    {
        if (! $this->messenger) {
            $this->setMessenger($this->loader->getMessenger());
        }

        return $this->messenger;
    }
591037
protected function getAddresses() {
        if (!$this->_addresses) {
            $this->_addresses = new AddressList($this->version, $this->solution['sid']);
        }

        return $this->_addresses;
    }
1023695
public function getRecipient() {
    $value = NULL;

    $field_activity_recipient_user = $this->field_activity_recipient_user;
    if (isset($field_activity_recipient_user)) {
      $recipient_user = $field_activity_recipient_user->getValue();
      if (!empty($recipient_user)) {
        $recipient_user['0']['target_type'] = 'user';
        return $recipient_user;
      }
    }

    $field_activity_recipient_group = $this->field_activity_recipient_group;
    if (isset($field_activity_recipient_group)) {
      $recipient_group = $field_activity_recipient_group->getValue();
      if (!empty($recipient_group)) {
        $recipient_group['0']['target_type'] = 'group';
        return $recipient_group;
      }
    }

    return $value;
  }