localpart_to = user_to_parts[0]
domain_to = user_to_parts[1]
- if domain_to.nil?
- # There was no "@" in the destination user.
- msg = "the destination user #{user_to} is not valid"
- raise InvalidUserError.new(msg)
- end
-
if not domain_exists(domain_to)
msg = "destination domain #{domain_to} does not exist"
raise NonexistentDomainError.new(msg)