Not able to send emails

Hello,

Could you please help me?

I am receiving the below erorr when sending emails
I am using zoho as host and smtp and email detailles are added correctly.

{‘retry’: 0, ‘log’: <function log at 0x7f15dcdd3140>, ‘site’: ‘site1.local’, ‘event’: u’sendmail’, ‘method_name’: u’sendmail’, ‘method’: <function sendmail at 0x7f15dce30578>, ‘user’: u’andrei.florea@bit24x7.com’, ‘kwargs’: {‘lang’: u’en’, ‘attachments’: [], ‘recipients’: [u’andrei.florea@bit24x7.com’], ‘cc’: [], ‘print_html’: u’’, ‘session’: {u’data’: {u’session_expiry’: u’06:00:00’, u’session_country’: ‘RO’, ‘csrf_token’: ‘46c204b5c449b2e1c76bcaceb9c94fad98cc58c32ef523315e65a188’, u’last_updated’: ‘2017-03-09 21:45:24.947731’, u’lang’: u’en’, u’user_type’: None, ‘user’: u’andrei.florea@bit24x7.com’, u’full_name’: None, u’device’: u’desktop’, ‘session_ip’: u’85.204.40.68’}, u’user’: u’andrei.florea@bit24x7.com’, u’sid’: u’fb68bbd7d375181a380b24daf849076559160b79db6fe7ac5a78ca5e’}, ‘communication_name’: ‘75787935d7’, ‘print_format’: u’Standard’}, ‘async’: True, ‘job_name’: u’<function sendmail at 0x7f812c78a398>’}
Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/background_jobs.py”, line 61, in execute_job
method(**kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/communication/email.py”, line 421, in sendmail
recipients=recipients, cc=cc)
File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/communication/communication.py”, line 179, in _notify
_notify(self, print_html, print_format, attachments, recipients, cc)
File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/communication/email.py”, line 133, in _notify
prepare_to_notify(doc, print_html, print_format, attachments)
File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/communication/email.py”, line 237, in prepare_to_notify
print_format=print_format, html=print_html))
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 1201, in attach_print
“fcontent”: get_print(doctype, name, print_format=print_format, style=style, html=html, as_pdf=True, doc=doc)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 1184, in get_print
return get_pdf(html, output = output)
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/pdf.py”, line 17, in get_pdf
pdfkit.from_string(html, fname, options=options or {})
File “/home/frappe/frappe-bench/env/src/pdfkit/pdfkit/api.py”, line 68, in from_string
return r.to_pdf(output_path)
File “/home/frappe/frappe-bench/env/src/pdfkit/pdfkit/pdfkit.py”, line 140, in to_pdf
raise IOError(‘wkhtmltopdf reported an error:\n’ + stderr.decode(‘utf-8’))
IOError: wkhtmltopdf reported an error:
Exit with code 1 due to network error: HostNotFoundError

Hi,
Please Check this

Hi,

If I add the hostname i receive the below erorr

RuntimeError
RuntimeError: no object bound to conf

Traceback (most recent call last)
File “/home/frappe/frappe-bench/apps/frappe/frappe/middlewares.py”, line 15, in call
return super(StaticDataMiddleware, self).call(environ, start_response)
File “/home/frappe/frappe-bench/env/lib/python2.7/site-packages/werkzeug/wsgi.py”, line 599, in call
return self.app(environ, start_response)
File “/home/frappe/frappe-bench/env/lib/python2.7/site-packages/werkzeug/wsgi.py”, line 599, in call
return self.app(environ, start_response)
File “/home/frappe/frappe-bench/env/lib/python2.7/site-packages/werkzeug/local.py”, line 228, in application
return ClosingIterator(app(environ, start_response), self.cleanup)
File “/home/frappe/frappe-bench/env/lib/python2.7/site-packages/werkzeug/wrappers.py”, line 291, in application
return f(*args[:-2] + (request,))(*args[-2:])
File “/home/frappe/frappe-bench/apps/frappe/frappe/app.py”, line 81, in application
response = handle_exception(e)
File “/home/frappe/frappe-bench/apps/frappe/frappe/app.py”, line 145, in handle_exception
response = frappe.website.render.render(“message”, http_status_code=http_status_code)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py”, line 22, in render
path = resolve_path(path or frappe.local.request.path.strip(’/ '))
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py”, line 166, in resolve_path
path = resolve_from_map(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py”, line 172, in resolve_from_map
for r in frappe.get_hooks(“website_route_rules”)])
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 791, in get_hooks
hooks = _dict(cache().get_value(“app_hooks”, load_app_hooks))
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/redis_wrapper.py”, line 53, in get_value
key = self.make_key(key, user)
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/redis_wrapper.py”, line 20, in make_key
return “{0}|{1}”.format(frappe.conf.db_name, key).encode(‘utf-8’)
File “/home/frappe/frappe-bench/env/lib/python2.7/site-packages/werkzeug/local.py”, line 343, in getattr
return getattr(self._get_current_object(), name)
File “/home/frappe/frappe-bench/env/lib/python2.7/site-packages/werkzeug/local.py”, line 306, in _get_current_object
raise RuntimeError(‘no object bound to %s’ % self.name)
RuntimeError: no object bound to conf
The debugger caught an exception in your WSGI application. You can now look at the traceback which led to the error.
To switch between the interactive traceback and the plaintext one, you can click on the “Traceback” headline. From the text traceback you can also create a paste of it. For code execution mouse-over the frame you want to debug and click on the console icon on the right side.

You can execute arbitrary Python code in the stack frames and there are some extra helpers available for introspection:

dump() shows all variables in the frame
dump(obj) dumps all that’s known about the object