You are here

public function SendinblueApiV2::getSmtpDetails in SendinBlue 7.2

Get the details of smtp.

Return value

GetSmtpDetails A smtp details.

Overrides SendInBlueApiInterface::getSmtpDetails

File

includes/Api/SendinblueApiV2.php, line 251

Class

SendinblueApiV2
Sendinblue REST client.

Code

public function getSmtpDetails() {
  $smtpDetails = $this->sIBHttpClient
    ->get("account/smtpdetail", "");
  $sibSmtpDetails = $smtpDetails['data']['relay_data']['data'];
  $enabled = $smtpDetails['data']['relay_data']['status'] === 'enabled';
  return new GetSmtpDetails($sibSmtpDetails['username'], $sibSmtpDetails['relay'], $sibSmtpDetails['port'], $enabled);
}