Ejemplo n.º 1
0
function create_envelope_recipients_xml($recipients, $role)
{
    $messagexml = "";
    if (!$recipients) {
        return $messagexml;
    }
    foreach ($recipients as $object) {
        $display = $object['display'];
        $address = $object['address'];
        $messagexml .= "<recipient>\n";
        $messagexml .= "<address>" . $address . "</address>\n";
        $messagexml .= "<display>" . make_cdata($display) . "</display>\n";
        $messagexml .= "<role>" . $role . "</role>\n";
        $messagexml .= "</recipient>\n";
    }
    return $messagexml;
}
Ejemplo n.º 2
0
function make_cdatatag($tagname, $text)
{
    return make_tag($tagname, make_cdata($text));
}
Ejemplo n.º 3
0
function create_header_recipients_xml($recipientsstring, $role)
{
    $messagexml = "";
    if (empty($recipientsstring)) {
        return $messagexml;
    }
    $recipients = explode(',', $recipientsstring);
    foreach ($recipients as $addressstring) {
        $addressparts = extract_address_from_string($addressstring);
        $display = $addressparts['display'];
        $address = $addressparts['address'];
        $messagexml .= "<recipient>\n";
        $messagexml .= "<address>" . $address . "</address>\n";
        $messagexml .= "<display>" . make_cdata($display) . "</display>\n";
        $messagexml .= "<role>" . $role . "</role>\n";
        $messagexml .= "</recipient>\n";
    }
    return $messagexml;
}