public static function doSendEncode($alist, array $opts = array())
    {
        $out = array();

        foreach ($alist as $ob) {
            if (!empty($opts['defserver'])) {
                foreach ($ob->raw_addresses as $ob2) {
                    if (is_null($ob2->host)) {
                        $ob2->host = $opts['defserver'];
                    }
                }
            }

            $out[] = $ob->writeAddress(array(
                'encode' => empty($opts['charset']) ? null : $opts['charset'],
                'idn' => true
            ));
        }

        return $out;
    }