def get_message_id():
 return u'<{unique}@{site}>'.format(site=frappe.local.site, unique=email.utils.make_msgid(random_string(10)).split(u'@')[0].split(u'<')[1])

def get_message_id ( ) : return u'<{unique}@{site}>' . format ( site = frappe . local . site , unique = email . utils . make_msgid ( random_string ( 10 ) ) . split ( u'@' ) [ 0 ] . split ( u'<' ) [ 1 ] )
returns message id created from doctype and name .