You are here

protected function ContactEmailer::getTo in Contact Emails 8

Get who to send the email to.

Parameters

\Drupal\contact_emails\Entity\ContactEmailInterface $email: The email settings.

Return value

string The to string to be used by the mail manager.

1 call to ContactEmailer::getTo()
ContactEmailer::sendEmails in src/ContactEmailer.php
Send the emails.

File

src/ContactEmailer.php, line 157

Class

ContactEmailer
Class ContactEmailer.

Namespace

Drupal\contact_emails

Code

protected function getTo(ContactEmailInterface $email) {
  $to = $this
    ->removeInvalidEmails($email
    ->getRecipients($this->contactMessage));
  return implode(', ', $to);
}