Migrated smtp server component to kotlin