• I am a small newspaper attempting to create a spot for seniors to share some information about them to be ran in my paper. The schools have requested to see the information provided before publication. I have a drop-down menu set up with each school. The thought is that the senior will select the school they attend and the form will carbon copy the specified individual at the school in which the senior attends. I have created the following code to handle the dynamics of the emails. Please note I have redacted the emails for privacy reasons.

    //Allows for a response to the Senior Submissions tab to be sent to the schools for approval before printing. Please update the emails if they are changed.
    function get_school_email_map($school) {
    $school_email_map = array(
    'Brunswick' => '[email protected]',
    'Keytesville' => '[email protected]',
    'Northwestern' => '[email protected]',
    'Salisbury' => '[email protected]',
    );
    return isset($school_email_map[$school]) ? $school_email_map[$school] : '';
    }

    // Shortcode to handle CF7 dynamic text
    add_shortcode('CF7_GET', function($atts) {
    $atts = shortcode_atts(array(
    'key' => '',
    'your-school' => '',
    ), $atts);

    if ($atts['key'] === 'school_email_map') {
    return get_school_email_map($atts['your-school']);
    }

    return '';
    });

    I am getting the configuration error of “Invalid mailbox syntax is used in the Cc field”. This is what I have in the Additional Headers field: Cc: [cc-email]

    Any help would be greatly appreciated. Thank you in advance!

    • This topic was modified 2 months, 4 weeks ago by Zane Duncan. Reason: Fixing Misspellings

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.