diff --git a/homeassistant/components/notify/mailgun.py b/homeassistant/components/notify/mailgun.py index 4a5a46f7e96..0e4254ae083 100644 --- a/homeassistant/components/notify/mailgun.py +++ b/homeassistant/components/notify/mailgun.py @@ -17,9 +17,7 @@ import homeassistant.helpers.config_validation as cv _LOGGER = logging.getLogger(__name__) -REQUIREMENTS = ['https://github.com/pschmitt/pymailgun/' - 'archive/1.3.zip#' - 'pymailgun==1.3'] +REQUIREMENTS = ['pymailgunner==1.4'] # Images to attach to notification ATTR_IMAGES = 'images' @@ -65,7 +63,7 @@ class MailgunNotificationService(BaseNotificationService): def initialize_client(self): """Initialize the connection to Mailgun.""" - from pymailgun import Client + from pymailgunner import Client self._client = Client(self._token, self._domain, self._sandbox) _LOGGER.debug("Mailgun domain: %s", self._client.domain) self._domain = self._client.domain @@ -74,7 +72,7 @@ class MailgunNotificationService(BaseNotificationService): def connection_is_valid(self): """Check whether the provided credentials are valid.""" - from pymailgun import (MailgunCredentialsError, MailgunDomainError) + from pymailgunner import (MailgunCredentialsError, MailgunDomainError) try: self.initialize_client() except MailgunCredentialsError: @@ -87,7 +85,7 @@ class MailgunNotificationService(BaseNotificationService): def send_message(self, message="", **kwargs): """Send a mail to the recipient.""" - from pymailgun import MailgunError + from pymailgunner import MailgunError subject = kwargs.get(ATTR_TITLE, ATTR_TITLE_DEFAULT) data = kwargs.get(ATTR_DATA) files = data.get(ATTR_IMAGES) if data else None diff --git a/requirements_all.txt b/requirements_all.txt index c6f56e3a9e0..4c7a06d9d30 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -300,9 +300,6 @@ https://github.com/molobrakos/python-pocketcasts/archive/9f61ff00c77c7c98ffa0af9 # homeassistant.components.switch.anel_pwrctrl https://github.com/mweinelt/anel-pwrctrl/archive/ed26e8830e28a2bfa4260a9002db23ce3e7e63d7.zip#anel_pwrctrl==0.0.1 -# homeassistant.components.notify.mailgun -https://github.com/pschmitt/pymailgun/archive/1.3.zip#pymailgun==1.3 - # homeassistant.components.switch.edimax https://github.com/rkabadi/pyedimax/archive/365301ce3ff26129a7910c501ead09ea625f3700.zip#pyedimax==0.1 @@ -590,6 +587,9 @@ pylitejet==0.1 # homeassistant.components.sensor.loopenergy pyloopenergy==0.0.17 +# homeassistant.components.notify.mailgun +pymailgunner==1.4 + # homeassistant.components.mochad pymochad==0.1.1