mail to user and port to swift