def initialize_client(self): """Initialize the connection to Mailgun.""" self._client = Client(self._api_key, self._domain, self._sandbox) _LOGGER.debug("Mailgun domain: %s", self._client.domain) self._domain = self._client.domain if not self._sender: self._sender = f"hass@{self._domain}"
def initialize_client(self): """Initialize the connection to Mailgun.""" from pymailgunner import Client self._client = Client(self._api_key, self._domain, self._sandbox) _LOGGER.debug("Mailgun domain: %s", self._client.domain) self._domain = self._client.domain if not self._sender: self._sender = DEFAULT_SENDER.format(domain=self._domain)