Get the list of email addresses to send to.
@return array
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);
    }
1170707
public function getAddressStrings(): array
    {
        $strings = [];
        foreach ($this->addresses as $address) {
            $str = $address->getEncodedAddress();
            if ($address instanceof NamedAddress && $name = $address->getName()) {
                $str = $this->createPhrase($this, $name, $this->getCharset(), empty($strings)).' <'.$str.'>';
            }
            $strings[] = $str;
        }

        return $strings;
    }
603794
public function getUserInput(): array
    {
        $data = [
            'email' => $this->input('email'),
            'is_active' => $this->filled('is_active') ? 1 : 0,
        ];

        if ($this->input('password')) {
            Arr::set($data, 'password', $this->input('password'));
        }

        return $data;
    }
511963
public function getNotificationRecipientIds()
    {
        $qb = $this->getEntityManager()->createQueryBuilder()
            ->select('n.recipient_id')
            ->distinct()
            ->from("Azine\EmailBundle\Entity\Notification", 'n')
            ->andWhere('n.sent is null');
        $results = $qb->getQuery()->execute();

        $ids = array();
        foreach ($results as $next) {
            $ids[] = $next['recipient_id'];
        }

        return $ids;
    }
172246
public function getBriefInfoMessages()
    {
        $array = imap_headers($this->imap);
        $newArray = [];
        foreach ($array as $key => $string) {
            $newArray[] = ['id'=>$key+1, 'info' => $string];
        };
        return $newArray;
    }
731879
public function toArray()
    {
        return array(
            // account
            'accountName' => $this->getAccountName(),
            'uid' => $this->getUid(),
            // contact
            'title' => $this->getTitle(),
            'salutation' => $this->getSalutation(),
            'firstName' => $this->getFirstName(),
            'lastName' => $this->getLastName(),
            'email' => $this->getEmail(),
            'phone' => $this->getPhone(),
            'phoneMobile' => $this->getPhoneMobile(),
            // address
            'street' => $this->getStreet(),
            'number' => $this->getNumber(),
            'addition' => $this->getAddition(),
            'zip' => $this->getZip(),
            'city' => $this->getCity(),
            'state' => $this->getState(),
            'country' => $this->getCountry(),
            'note' => $this->getNote(),
            'contactAddress' => $this->getContactAddress() ? array(
                'id' => $this->getContactAddress()->getId()
            ) : null,
            // postbox
            'postboxCity' => $this->getPostboxCity(),
            'postboxNumber' => $this->getPostboxNumber(),
            'postboxPostcode' => $this->getPostboxPostcode(),
        );
    }
100104
protected function getListAccountAddress()
    {
        $addresses = $this->address->getTranslatedList($this->data_user['user_id']);
        return $this->prepareListAccountAddress($addresses);
    }
328004
public function listMessages()
    {
        $messages = array();
        fseek( $this->fh, 0 );
        // Skip the first mail as this is the mbox header
        $position = $this->findFirstMessage();
        if ( $position === false )
        {
            return $messages;
        }
        // Continue reading through the rest of the mbox
        do
        {
            $position = $this->findNextMessage();
            if ( $position !== false )
            {
                $messages[] = $position;
            }
        } while ( $position !== false );

        return $messages;
    }
147247
public function getListingFolders() {
		$folders = imap_list($this->getImapStream(), $this->imapPath, "*");
		foreach ($folders as $key => $folder)
		{
			$folder = str_replace($this->imapPath, "", imap_utf7_decode($folder));
			$folders[$key] = $folder;
		}
		return $folders;
	}
784972
public function notify() : array
  {
    return Mail::make()
            ->to($this->email)
            ->subject('Verify Email Address')
            ->title('Hello!')
            ->line('Please click the button below to verify your email.')
            ->action('Verify Email Address', url("/account/verify?token={$this->token}", true))
            ->line('If you did not create an account, no futher action is required.')
            ->separate()
            ->small('If you\'re having trouble clicking the "Verify Email Address" button, copy and paste the URL below into your browser. ' . url("/account/verify?token={$this->token}", true))
            ->view('app.mail.default')
            ->send();
  }
1212150
public function getFieldsTranslations()
    {
        $fieldList = parent::getFieldsTranslations();

        // Add the key values (so organization id is present)
        $keys = array_combine(array_values($this->_targetModel->getKeys()), array_values($this->_targetModel->getKeys()));
        $fieldList = $fieldList + $keys;

        $fieldList['grs_email'] = 'gr2o_email';

        return $fieldList;
    }
738012
public function toArray()
	{
		return [
			'name' => (string) $this->name,
			'email' => SerializationHelper::serialize($this->email),
			'links' => SerializationHelper::serialize($this->links)
		];
	}
222331
public function getHeaders()
    {
        if ($this->_headers === null) {
            if (!$this->_mail) {
                $this->_headers = array();
            } else {
                $part = $this->_mail->getRawHeader($this->_messageNum);
                Zend_Mime_Decode::splitMessage($part, $this->_headers, $null);
            }
        }

        return $this->_headers;
    }
1131459
public function getEmailFields()
    {
        $fields = array(
            'email' => EmailField::create($this->getFieldName('email'), _t('SilverStripe\Omnipay\PaymentForm.Email', 'Email'))
        );

        $this->cullForGateway($fields);

        return FieldList::create($fields);
    }
1141596
public function getPrettyMailboxes()
    {
        $mailboxes = $this->getMailboxes();
        $result = [];
        if (is_array($mailboxes) && count($mailboxes) > 0) {
            $prefixedMailbox = "INBOX.";
            foreach ($mailboxes as $mailbox) {
                // Remove the server prefix
                $mailbox = str_replace('{'.$this->settings['server'].'}', '', $mailbox);

                // Remove the INBOX. prefix (if present)
                $mailbox = str_replace($prefixedMailbox, '', $mailbox);

                $result[] = $mailbox;
            }
        }

        return $result;
    }
183281
public function getBcc()
    {
        $recipients = [];
        foreach ($this->message->getBcc() as $email => $name) {
            $recipients[] = new Email($email, $name);
        }

        return $recipients;
    }
829665
public function toArray()
    {
        return [
            'message' => $this->getMessageException(),
            'errors' => $this->getErrors(),
            'debugCode' => $this->getDebugCode(),
            'details' => $this->getDetails(),
            'routeBack' => redirect()->back()->getTargetUrl()
        ];
    }