0)
return $value;

}
}

$headers = 'From: Satori Academy ' . "\r\n\\";
$subject = " Kovars Satori Academy - 4 Weeks for Free, Plus a Free Uniform";
add_filter('wp_mail_content_type','set_contenttype');

$firstName = $_POST["firstName"];
$lastName = $_POST["lastName"];
$email = $_POST["email"];
$friendFirstName1 = $_POST["friendFirstName1"];
$friendLastName1 = $_POST["friendLastName1"];
$friendEmail1 = $_POST["friendEmail1"];
$friendFirstName2 = $_POST["friendFirstName2"];
$friendLastName2 = $_POST["friendLastName2"];
$friendEmail2 = $_POST["friendEmail2"];
$friendFirstName3 = $_POST["friendFirstName3"];
$friendLastName3 = $_POST["friendLastName3"];
$friendEmail3 = $_POST["friendEmail3"];
$location = $_POST["location"];
$locationParts = split(':', $location);//gets the location email address in 0 and name in 1
$staffEmail = '

Referring Person\'s First Name: ' . $firstName . '

Referring Person\'s Last Name: ' . $lastName . '

Referring Person\'s Email: ' . $email . '

Home Location: ' . $locationParts[1] . '

-------------------------------------------------------------

Friend\'s First Name: ' .
$friendFirstName1 . '

Friend\'s Last Name: ' . $friendLastName1 . '

Friend\'s Email: ' . $friendEmail1 . '

-------------------------------------------------------------

Friend\'s First Name: ' . $friendFirstName2 . '

Friend\'s Last Name: ' . $friendLastName2 . '

Friend\'s Email: ' . $friendEmail2 . '

' .
'

-------------------------------------------------------------

Friend\'s First Name: ' . $friendFirstName3 . '

Friend\'s Last Name: ' . $friendLastName3 . '

Friend\'s Email: ' . $friendEmail3 . '

';

//wp_mail($locationParts[0], 'Pass It On Page Referral Notice – 4 Weeks Free, Plus a Free Uniform', $staffEmail, $headers, $attachments);
wp_mail('jenniferaquino813@gmail.com', 'Pass It On Page Referral Notice – 4 Weeks Free, Plus a Free Uniform', $staffEmail, $headers, $attachments);

$autoResponderMessage = '

Dear ' . $friendFirstName1 . ' ' . $friendLastName1 . ',

Your friend, ' . $firstName . ' ' . $lastName . ', trains at Kovar’s Martial Arts and wanted to share the positive impact Martial Arts has had on their family. We invite you to try us free for 4 weeks for any members of your family.

We offer classes 6 days a week for children ages 4 and older, teens, and adults. Martial Arts addresses so many of the issues kids face today from school and street safety to having the self confidence to know how to handle a bully.

For Teens and Adults we additionally offer Jiu-Jitsu, Krav Maga, Mixed Martial Arts and the Satori FIT program.

As a courtesy, a member of our staff will reach out to you to help you get started in the right program.

Yours in Health,
Kyoshi Dave Kovar

';

wp_mail($friendEmail1, $subject, $autoResponderMessage, $headers, $attachments);

$autoResponderMessage = '

Dear ' . $friendFirstName2 . ' ' . $friendLastName2 . ',

Your friend, ' . $firstName . ' ' . $lastName . ', trains at Kovar’s Martial Arts and wanted to share the positive impact Martial Arts has had on their family. We invite you to try us free for 4 weeks for any members of your family.

We offer classes 6 days a week for children ages 4 and older, teens, and adults. Martial Arts addresses so many of the issues kids face today from school and street safety to having the self confidence to know how to handle a bully.

For Teens and Adults we additionally offer Jiu-Jitsu, Krav Maga, Mixed Martial Arts and the Satori FIT program.

As a courtesy, a member of our staff will reach out to you to help you get started in the right program.

Yours in Health,
Kyoshi Dave Kovar

';

wp_mail($friendEmail2, $subject, $autoResponderMessage, $headers, $attachments);

$autoResponderMessage = '

Dear ' . $friendFirstName3 . ' ' . $friendLastName3 . ',

Your friend, ' . $firstName . ' ' . $lastName . ', trains at Kovar’s Martial Arts and wanted to share the positive impact Martial Arts has had on their family. We invite you to try us free for 4 weeks for any members of your family.

We offer classes 6 days a week for children ages 4 and older, teens, and adults. Martial Arts addresses so many of the issues kids face today from school and street safety to having the self confidence to know how to handle a bully.

For Teens and Adults we additionally offer Jiu-Jitsu, Krav Maga, Mixed Martial Arts and the Satori FIT program.

As a courtesy, a member of our staff will reach out to you to help you get started in the right program.

Yours in Health,
Kyoshi Dave Kovar

';

wp_mail($friendEmail3, $subject, $autoResponderMessage, $headers, $attachments);
?>

To send to more friends, click here.