You are here

public function SendinblueApiV3::getSmtpDetails in SendinBlue 8

Same name and namespace in other branches
  1. 8.2 src/Tools/Api/SendinblueApiV3.php \Drupal\sendinblue\Tools\Api\SendinblueApiV3::getSmtpDetails()

Get the details of smtp.

Return value

\Drupal\sendinblue\Tools\Model\GetSmtpDetails|null A smtp details.

Overrides SendInBlueApiInterface::getSmtpDetails

File

src/Tools/Api/SendinblueApiV3.php, line 348

Class

SendinblueApiV3
Sendinblue REST client.

Namespace

Drupal\sendinblue\Tools\Api

Code

public function getSmtpDetails() {
  $smtpDetails = $this->sibAccountApi
    ->getAccount()
    ->getRelay();
  if ($smtpDetails) {
    return new GetSmtpDetails($smtpDetails
      ->getData()
      ->getUserName(), $smtpDetails
      ->getData()
      ->getRelay(), $smtpDetails
      ->getData()
      ->getPort(), (bool) $smtpDetails
      ->getEnabled());
  }
  return null;
}