Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Hooking up volunteer email. Straight up baby!

  • Loading branch information...
commit ce81f4ec7f4d24058ecb69de6016d6a805332abd 1 parent 079cb16
Philip Kelly pkelly authored

Showing 2 changed files with 22 additions and 2 deletions. Show diff stats Hide diff stats

  1. +20 1 includes/functions.php
  2. +2 1  volunteer-post-email.php
21 includes/functions.php
... ... @@ -1,5 +1,7 @@
1 1 <?php
2 2
  3 +define("VOLUNTEER_EMAIL_RECIPIENT", "chatche+zurbwired@gmail.com");
  4 +
3 5 function is_valid_email($email) {
4 6
5 7
@@ -956,7 +958,24 @@ function sendmailnew($VolunteerId,$typeId){
956 958
957 959 }
958 960
959   -// return an array of open task details and their IDs
  961 +function sendVolunteerEmail($values) {
  962 + $message = "Name: $values[name]\n"
  963 + . "Email: $values[email]\n"
  964 + . "Phone: $values[phone]\n"
  965 + . "Company or School: $values[org]\n"
  966 + . "Under 18: ".$values[under18]."\n"
  967 + . "Grade: $values[grade]\n"
  968 + . "Days available: " . join(", ", $values[weekday]) . "\n"
  969 + . "Times available: " . join(", ", $values[time]) . "\n"
  970 + . "Volunteering for: $values[purpose]\n"
  971 + . "Volunteering for (Other): $values[purpose_other]\n"
  972 + . "Hours for school: $values[schoolhrs]\n"
  973 + . "Company matching program: $values[matching]\n"
  974 + . "Special Skills: $values[skills]\n"
  975 + . "Additional Info: $values[info]\n";
  976 +
  977 + mail(VOLUNTEER_EMAIL_RECIPIENT, "Volunteer Signup: $values[name]", $message);
  978 +}
960 979
961 980
962 981 ?>
3  volunteer-post-email.php
... ... @@ -1,5 +1,6 @@
1 1 <?
  2 +include_once("includes/functions.php");
2 3 if ($_POST) {
3   - var_dump($_POST);
  4 + sendVolunteerEmail($_POST);
4 5 }
5 6 ?>

0 comments on commit ce81f4e

Please sign in to comment.
Something went wrong with that request. Please try again.