Esempio n. 1
0
    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}"
Esempio n. 2
0
 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)