• Hi,

    I’ve tried all sorts to no avail, so have to ask for help.

    Is there any way to pass an email address that can replace the $to address for smcf.

    I had in mind to use a custom filed on the ppost and nearly have it working with in smcf_data.php –

    $postID = 270;
    $to = get_post_meta($postID, ‘recipient’, true);

    Of course this only works for the post with and ID of 270. But I just can’t seem to find a way to pull in the current posts id (i.e. the one that spawned the smcf).

    I hope that makes sense and that you can advise.

    Thank you.

Viewing 1 replies (of 1 total)
  • Hi,

    I wanted the same feature, so I do that :

    in simplemodal-contact-form-smcf/smcf.php ; function footer()

    after line :
    $output .= "<div id='smcf-content' style='display:none'>

    I put a line like that :
    <INPUT TYPE='HIDDEN' NAME='mailTo' VALUE='".$mailTo."'>

    before this line I put something like that:
    `global $post;
    $mailTo=$post->VAR;

    In simplemodal-contact-form-smcf/smcf_data.php

    after line if ($action == "send") {

    I put : $mailTo = isset($_POST["mailTo"]) ? $_POST["mailTo"] : "default@mail.com";

    I changed parameters of function with addinf $mailTo
    function sendEmail($name, $email, $subject, $message, $cc, $mailTo) {

    And in that function after line : $to = get_option("smcf_to_email");
    I put : $to = $mailTo;

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: SimpleModal Contact Form (SMCF)] Passing to email address to smcf’ is closed to new replies.