You most probably want call this directly on MimePart class. I didn't rename it in the Message class on purpose.