I didn't try the code out but from looking at it I wonder if it does the right thing: by commenting out these lines you get a list like this in tolist: {{Fritz <fritz@frotz.com>} foo@bar.com}.
Later in _ns_sendmail there is this code:
## Loop through To list via multiple RCPT TO lines
foreach toto $tolist {
_ns_smtp_send $wfp "RCPT TO:<$toto>" $timeout
_ns_smtp_recv $rfp 250 $timeout
}
which means it would for the first item in the $tolist send the following line to the SMTP server:
RCPT TO:<Fritz <fritz@frotz.com>>
which has one enclosing pair of angle brackets too much. Shouldn't that be:
RCPT TO: Fritz <fritz@frotz.com>
? You might get away with it if it is a forgiving mailserver, but it isn't right IMHO. Or am I missing something?