Skip to content
  • Thomas Sibley's avatar
    Normalize forward recipients before sending and adjust tests to match reality · c92e6162
    Thomas Sibley authored
    None of the usual parsing and normalization of email recipients was done
    when forwarding tickets or transactions.  Use RT::EmailParser's
    ParseEmailAddress method to convert to Email::Address objects
    (effectively a split), then reformat and join back together.  This
    ensures domain-less usernames are supported in forwards just like
    elsewhere.  Importantly, this change also ensures the transaction
    recording the forward action has a Data column which is guaranteed
    parseable.
    
    The forwarding tests previously tested a domain-less user in the same
    field as a full email address, which is not supported by RT's email
    parsing and would likely never work as expected with a real MTA.  Switch
    to testing domain-less users are parsed correctly when in their own
    recipient field.
    
    These bugs were uncovered by RT::Transaction's new parsing of $txn->Data
    for generating history descriptions.
    c92e6162