Created
February 11, 2015 09:03
-
-
Save bryceadams/f151764614739b9e0e13 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'new_job_application', 'send_new_job_application_confirmation', 10, 2 ); | |
function send_new_job_application_confirmation( $application_id, $job_id ) { | |
$candidate_email = get_post_meta( $application_id, '_candidate_email', true ); | |
$message = sprintf( "Thanks for your application for '%s'. We'll get back to you as soon as possible.", get_the_title( $job_id ) ); | |
$attachments = array( WP_CONTENT_DIR . '/uploads/file_to_attach.zip' ); // Direct link to a file you want to attach | |
wp_mail( $candidate_email, 'Your Application on ' . get_bloginfo( 'name' ), $message, '', $attachments ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment