Hi - I am trying to use this filter to add some functionality but I'm not getting any response from it. It's in the functions.php file here is the code. Basically i am distributing the messages to different recipients and then keeping a record who got what.
add_filter("gform_pre_send_email", "rah_leads_gravity");
function rah_leads_gravity($email){
// Interaction with message data
$thisEmailAddress = get_option('nextLead');
$email["to"] = $thisEmailAddress;
$senderEmail = $email["from"];
$senderSubject = $email["subject"];
$timeSent = time();
// Queue next email address
rah_leads_update_queue($thisEmailAddress);
//Update message list
global $wpdb;
$wpdb->insert('wp_rah_leads_messages', array(
toEmail => $thisEmailAddress,
fromEmail => $senderEmail,
emailTitle => $senderSubject,
emailDate => $timeSent
));
return $email;
}
http://www.gravityhelp.com/documentation/page/Gform_before_email