Sending outgoing email error in version 8, need help

Error:
or{‘retry’: 0, ‘log’: , ‘site’: u’site1.local’, ‘event’: u’sendmail’, ‘method_name’: u’sendmail’, ‘method’: , ‘user’: u’smsco.erp@outlook.com’, ‘kwargs’: {‘lang’: u’en-US’, ‘attachments’: [], ‘recipients’: [u’a.wahab@khi.smsco.pk’], ‘cc’: [], ‘print_html’: u’‘, ‘session’: {u’data’: {u’session_expiry’: u’06:00:00’, u’session_country’: ‘PK’, ‘csrf_token’: ‘9423dca5e6745118e5ee83ccaf45dffd8b63543983a1054795c35772’, u’last_updated’: ‘2017-04-26 14:58:37.226908’, u’lang’: u’en-US’, u’user_type’: None, ‘user’: u’smsco.erp@outlook.com’, u’full_name’: None, u’device’: u’desktop’, ‘session_ip’: u’110.38.136.23’}, u’user’: u’smsco.erp@outlook.com’, u’sid’: u’fcbeb8761ca445b5b6f612d94f1e1519f390cef712e13892fc041829’}, ‘communication_name’: ‘d83b4557ee’, ‘print_format’: u’Standard’}, ‘async’: True, ‘job_name’: u’'}
Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/background_jobs.py”, line 65, in execute_job
method(**kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/communication/email.py”, line 424, in sendmail
recipients=recipients, cc=cc)
File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/communication/communication.py”, line 211, 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 139, 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 249, in prepare_to_notify
print_format=print_format, html=print_html))
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 1227, 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 1210, 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

1 Like

wahab please search the forum for ‘Exit with code 1 due to network error: HostNotFoundError’

You will find other recent similar reports of your error with responses of advice for you to follow…

1 Like

Seems like the print format creation failed due to a broken link in the image? - there should be a better way to show this error

Any solution?

Hello clarkey,

“Exit with code 1” it does not work for me. Any other solution?

Try this solution

Clarkej,

Please have a look on below mentioned screenshots:
Email Domain


Email Account

Error
Server Error: Please check your server logs or contact tech support.
Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/app.py”, line 56, in application
response = frappe.handler.handle()
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 19, in handle
execute_cmd(cmd)
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 42, in execute_cmd
ret = frappe.call(method, **frappe.form_dict)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 907, in call
return fn(*args, **newargs)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/buying/doctype/request_for_quotation/request_for_quotation.py”, line 146, in send_supplier_emails
rfq.send_to_supplier()
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/buying/doctype/request_for_quotation/request_for_quotation.py”, line 56, in send_to_supplier
self.supplier_rfq_mail(rfq_supplier, update_password_link, self.get_link())
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/buying/doctype/request_for_quotation/request_for_quotation.py”, line 125, in supplier_rfq_mail
attachments = self.get_attachments()
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/buying/doctype/request_for_quotation/request_for_quotation.py”, line 138, in get_attachments
attachments.append(frappe.attach_print(self.doctype, self.name, doc=self))
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 1227, 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 1210, 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: ConnectionRefusedError

You still get this traceback after you added “host_name”: “http://localhost:8000” to site_config.json?

Yes

wahab

This problem is solved.

by enable-scheduler.