forum::email::create_forward_email (public)

 forum::email::create_forward_email -pre_body pre_body message_passed

Defined in packages/forums/tcl/forums-email-procs.tcl

create email content to forward a message

Switches:
-pre_body
(required)
Parameters:
message_passed

Partial Call Graph (max 5 caller/called nodes):
%3 packages/forums/www/message-email.tcl packages/forums/ www/message-email.tcl forum::email::create_forward_email forum::email::create_forward_email packages/forums/www/message-email.tcl->forum::email::create_forward_email _ _ (public) forum::email::create_forward_email->_ ad_conn ad_conn (public) forum::email::create_forward_email->ad_conn ad_html_text_convert ad_html_text_convert (public) forum::email::create_forward_email->ad_html_text_convert ad_html_to_text ad_html_to_text (public) forum::email::create_forward_email->ad_html_to_text ad_url ad_url (public) forum::email::create_forward_email->ad_url

Testcases:
No testcase defined.
Source code:
    # Get the message data array
    upvar $message_passed message

    # Variables for I18N message lookup:
    set posting_date $message(posting_date_ansi)
    set useScreenNameP [parameter::get -parameter "UseScreenNameP" -default 0]
    if {$useScreenNameP != 0} {
    set user_name $message(screen_name)
    } else {
    set user_name $message(user_name)
    }

    # Set up the message body
    set new_body "[ad_html_to_text -- $pre_body]"
    append new_body "\n\n===================================\n\n"
    append new_body [subst {[_ forums.email_alert_body_header]
[_ forums.Forum_1] $message(forum_name)
Thread: $message(root_subject)\n
}]
    append new_body [ad_html_text_convert -from $message(format) -to text/plain -- $message(content)]
    set url [export_vars  -base "[ad_url][ad_conn package_url]message-view"  -anchor $message(message_id) {{message_id $message(root_message_id)}}]
    append new_body "\n\n-- \n$url\n"

    return $new_body
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: