Text this: Optimal port-based teleportation