Server Error - IndexError: list index out of range\n

Hi all,

I am getting index out of range while receiving and sending the email from erpnext

Traceback Logs

Traceback (most recent call last):
  File "apps/frappe/frappe/utils/", line 104, in execute_job
  File "apps/frappe/frappe/email/doctype/email_account/", 
line 840, in pull_from_email_account
  File "apps/frappe/frappe/email/doctype/email_account/", line 365, in receive
    raise Exception(frappe.as_json(exceptions))
Exception: [
 "Traceback (most recent call last):\n  File \"apps/frappe/frappe/email/doctype/email_account/\", line 334, in receive\n  
  communication = self.insert_communication(msg, args=args)\n  File 
\"apps/frappe/frappe/email/doctype/email_account/\", line 457, in 
insert_communication\n    communication.insert(ignore_permissions=True)\n  File 
\"apps/frappe/frappe/model/\", line 240, in insert\n    self.run_before_save_methods()\n  File \"apps/frappe/frappe/model/\", line 971, in run_before_save_methods\n    self.run_method(\"validate\")\n  File \"apps/frappe/frappe/model/\", line 868, in run_method\n    out = 
Document.hook(fn)(self, *args, **kwargs)\n  File \"apps/frappe/frappe/model/\", line 1161, in composer\n    return composed(self, method, *args, **kwargs)\n  File \"apps/frappe/frappe/model/\", line 1144, in runner\n    add_to_return_value(self, fn(self, *args, **kwargs))\n  File \"apps/frappe/frappe/model/\", line 862, in <lambda>\n    fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)\n  File 
\"apps/frappe/frappe/core/doctype/communication/\", line 66, in validate\n    self.set_timeline_links()\n  File \"apps/frappe/frappe/core/doctype/communication/\", line 263, in set_timeline_links\n    contacts = get_contacts([self.sender, self.recipients,, self.bcc], auto_create_contact=create_contact_enabled)\n  File \"apps/frappe/frappe/core/doctype/communication/\", line 353, in get_contacts\n    email = get_email_without_link(email)\n  File \"apps/frappe/frappe/core/doctype/communication/\", line 425, in get_email_without_link\n  

  email_host = email.split(\"@\")[1]\nIndexError: list index out of range\n"

How to resolve this index out-of-range error?


Were you receiving and sending emails successfully or is this happening on first use?
What version of ERPNext ?

Erpnext version 13

Yes we are able to receive and sent e-mails.Suddenly, from few days this error appears in error list

Hi Erpnext forum

Kindly update