fix custom mailtype error