Skip to content

Instantly share code, notes, and snippets.

@nciske
Last active March 30, 2017 17:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nciske/990ae7645ab1cf662886c51142d81a65 to your computer and use it in GitHub Desktop.
Save nciske/990ae7645ab1cf662886c51142d81a65 to your computer and use it in GitHub Desktop.
Send an email post submission
<?php
add_action('salesforce_w2l_after_submit', 'salesforce_w2l_after_submit_send_email', 10, 3 );
function salesforce_w2l_after_submit_send_email( $post, $form_id, $form_type ){
$form_number = 1; // ID of the form to send this email for
if( $form_id == $form_number ){
$to = 'your@email.com';
$subject = 'Estimate on website';
$message = 'Enter your message here. You\'ll need to manually add the data though ' .$post['name']. '.';
wp_mail( $to, $subject, $message );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment