Yes,
But i am not able to see PLAIN_TEXT when i am doing dir(BodyContentType).
print(dir(BodyContentType)) [‘HTML’, ‘RTF’, ‘abs’, ‘add’, ‘and’, ‘bool’, ‘ceil’, ‘class’, ‘contains’, ‘delattr’, ‘dir’, ‘divmod’, ‘doc’, ‘eq’, ‘float’, ‘floor’, ‘floordiv’, ‘format’, ‘ge’, ‘getattribute’, ‘getitem’, ‘getnewargs’, ‘getstate’, ‘gt’, ‘hash’, ‘index’, ‘init’, ‘init_subclass’, ‘int’, ‘invert’, ‘iter’, ‘le’, ‘len’, ‘lshift’, ‘lt’, ‘members’, ‘mod’, ‘module’, ‘mul’, ‘name’, ‘ne’, ‘neg’, ‘new’, ‘or’, ‘pos’, ‘pow’, ‘qualname’, ‘radd’, ‘rand’, ‘rdivmod’, ‘reduce’, ‘reduce_ex’, ‘repr’, ‘rfloordiv’, ‘rlshift’, ‘rmod’, ‘rmul’, ‘ror’, ‘round’, ‘rpow’, ‘rrshift’, ‘rshift’, ‘rsub’, ‘rtruediv’, ‘rxor’, ‘setattr’, ‘sizeof’, ‘str’, ‘sub’, ‘subclasshook’, ‘truediv’, ‘trunc’, ‘xor’, ‘as_integer_ratio’, ‘bit_count’, ‘bit_length’, ‘conjugate’, ‘denominator’, ‘from_bytes’, ‘imag’, ‘is_integer’, ‘numerator’, ‘real’, ‘to_bytes’]
I have added handling so that I call set_body_content only when the format is HTML or RTF. Otherwise, I do not call set_body_content. Will that break functionality? I assumed that by default it will work for plain text. Is this fine?