Integrating Email in ERPNext 13 - [Errno 99] Cannot assign requested address

Hi Guys,

I’m looking into implementing email support into my ERPNext (running on Frappe Cloud) instance again after changing our web server. However now I’m not able to establish a new connection no matter what server I enter (I tried 2 completely different servers, one is our own root server the other one was our credentials for our Mailjet Account).

According to what I found on Github and the forums this behaviour is due to connection restrictions on the server configuration, but the Frappe Cloud Support told me that this is not an hosting issue, but instead telling me that our mail server is misconfigured. Which I honestly don’t understand why that should be the case. Our own web server might be misconfigured, but the Server from Mailjet surely not.

Here’s the traceback

Traceback (most recent call last):
  File "apps/frappe/frappe/email/doctype/email_domain/", line 86, in validate
    (self.smtp_server or "").encode("utf-8"), cint(self.smtp_port) or None
  File "/usr/lib/python3.7/", line 1036, in __init__
  File "/usr/lib/python3.7/", line 251, in __init__
    (code, msg) = self.connect(host, port)
  File "/usr/lib/python3.7/", line 336, in connect
    self.sock = self._get_socket(host, port, self.timeout)
  File "/usr/lib/python3.7/", line 1042, in _get_socket
  File "/usr/lib/python3.7/", line 728, in create_connection
    raise err
  File "/usr/lib/python3.7/", line 716, in create_connection
OSError: [Errno 99] Cannot assign requested address

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "apps/frappe/frappe/", line 69, in application
    response = frappe.api.handle()
  File "apps/frappe/frappe/", line 55, in handle
    return frappe.handler.handle()
  File "apps/frappe/frappe/", line 38, in handle
    data = execute_cmd(cmd)
  File "apps/frappe/frappe/", line 76, in execute_cmd
    return, **frappe.form_dict)
  File "apps/frappe/frappe/", line 1457, in call
    return fn(*args, **newargs)
  File "apps/frappe/frappe/desk/form/", line 24, in savedocs
  File "apps/frappe/frappe/model/", line 310, in save
    return self._save(*args, **kwargs)
  File "apps/frappe/frappe/model/", line 347, in _save
  File "apps/frappe/frappe/model/", line 1052, in run_before_save_methods
  File "apps/frappe/frappe/model/", line 941, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "apps/frappe/frappe/model/", line 1261, in composer
    return composed(self, method, *args, **kwargs)
  File "apps/frappe/frappe/model/", line 1243, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
  File "apps/frappe/frappe/model/", line 938, in fn
    return method_object(*args, **kwargs)
  File "apps/frappe/frappe/email/doctype/email_domain/", line 104, in validate
    msg='Error connecting SMTP "{host}": {e}'.format(host=self.smtp_server, e=e),
  File "apps/frappe/frappe/", line 511, in throw
  File "apps/frappe/frappe/", line 479, in msgprint
  File "apps/frappe/frappe/", line 434, in _raise_exception
    raise raise_exception(msg)
frappe.exceptions.ValidationError: Error connecting SMTP "redacted": [Errno 99] Cannot assign requested address

Anybody an idea?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.