pub fn send_email(rrc: &RootRenderingComponent) {
    if let Some(accommodation_data) = &rrc.accommodation_data {
        let window = unwrapmod::unwrap_option_abort(web_sys::window());

        let link = format!(
            "mailto:{}?subject={}&body={}",
            urlencoding::encode(&accommodation_data.email),
            stringmod::concat_4(
                "Form C data ",
                fetchjsonformatmod::get_by_name_req(&rrc.json_format, "applicant_surname")
                    .value
                    .as_str(),
                " ",
                fetchjsonformatmod::get_by_name_req(&rrc.json_format, "applicant_givenname")
                    .value
                    .as_str()
            ),
            urlencoding::encode(&unwrapmod::unwrap_result_abort(
                serde_json::to_string_pretty(&rrc.json_result)
            ))
        );
        let _x = window.open_with_url_and_target(&link, "_blank");
    }
}
///open email client for send email
open email client for send email
open email client for send email
pub fn send_email(rrc: &RootRenderingComponent) {
    if let Some(accommodation_data) = &rrc.accommodation_data {
        let window = unwrapmod::unwrap_option_abort(web_sys::window());
        let link = format!(
            "mailto:{}?subject={}&body={}",
            urlencoding::encode(&accommodation_data.email),
            stringmod::concat_4(
                "Form C data ",
                fetchjsonformatmod::get_by_name_req(&rrc.json_format, "applicant_surname")
                    .value
                    .as_str(),
                " ",
                fetchjsonformatmod::get_by_name_req(&rrc.json_format, "applicant_givenname")
                    .value
                    .as_str()
            ),
            urlencoding::encode(&unwrapmod::unwrap_result_abort(
                serde_json::to_string_pretty(&rrc.json_result)
            ))
        );
        let _x = window.open_with_url_and_target(&link, "_blank");
    }
}
pub fn send_email ( rrc : & RootRenderingComponent ) { if let Some ( accommodation_data ) = & rrc . accommodation_data { let window = unwrapmod :: unwrap_option_abort ( web_sys :: window ( ) ) ; let link = format ! ( " " urlencoding encode ( accommodation_data email ) stringmod concat_4 ( " " fetchjsonformatmod get_by_name_req ( rrc json_format " " ) value as_str ( ) " " fetchjsonformatmod get_by_name_req ( rrc json_format " " ) value as_str ( ) ) urlencoding encode ( unwrapmod unwrap_result_abort ( serde_json to_string_pretty ( rrc json_result ) ) ) ) ; let _x = window . open_with_url_and_target ( & link , " " ) ; } }
open email client for send email
open email client for send email
rrc
&RootRenderingComponent
rrc
&RootRenderingComponent