$value) { // assign to temporary variable and strip whitespace if not an array $temp = is_array($value) ? $value : trim($value); // if empty and required, add to $missing array if (empty($temp) && in_array($key, $required)) { array_push($missing, $key); } // otherwise, assign to a variable of the same name as $key elseif (in_array($key, $expected)) { ${$key} = $temp; } } // go ahead only if all required fields OK if (empty($missing)) { //////////////////////////////////////////////////////////////////////////////// // 3. Build the e-mail message // //////////////////////////////////////////////////////////////////////////////// $message .= "Name: $NameFirst $NameMiddle $NameLast\n"; $message .= "E-mail: $Email\n"; $message .= "Address: $Address\n"; $message .= "City: $City\n"; $message .= "State/Province: $State\n"; $message .= "Zip: $Zip\n"; $message .= "Home Phone: ($PhoneHome_01) $PhoneHome_02-$PhoneHome_03\n"; $message .= "Daytime Phone: ($PhoneDaytime_01) $PhoneDaytime_02-$PhoneDaytime_03\n"; $message .= "Other Phone: ($PhoneOther_01) $PhoneOther_02-$PhoneOther_03\n"; $message .= "_________________________________________\n\n"; $message .= "Degrees\n"; $message .= "Degree 1: $degree1\n"; $message .= "Received: $degree1year\n\n"; $message .= "Degree 2: $degree2\n"; $message .= "Received: $degree2year\n\n"; $message .= "_________________________________________\n\n"; $message .= "Award Information\n"; $message .= "_________________________________________\n\n"; $message .= "Award Name: $awardName\n"; $message .= "Award Inromation: $Award\n\n"; $message .= "_________________________________________\n\n"; $message .= "Comments and questions\n"; $message .= "_________________________________________\n\n"; $message .= "$Comments\n\n"; $message .= "_________________________________________\n\n"; $message .= "This message was generated from the 'Alumni and Friends' online form at: http://www.wmich.edu/honors/alumni.php\n\n\n\n"; //////////////////////////////////////////////////////////////////////////////// // limit line length to 70 characters $message = wordwrap($message, 70); $headers = 'From: ' . $Email . "\r\n" . 'Reply-To: ' . $Email . "\r\n" . 'X-Mailer: PHP/' . phpversion(); // send it $mailSent = mail($to, $subject, $message); if ($mailSent) { // $missing is no longer needed if the email is sent, so unset it unset($missing); } } } ?>

Have you been awarded or recognized for your achievements recently? Send us the information and we will post the news item on the Lee Honors College (LHC) Web site.
Please complete the missing item(s) indicated.
Sorry, there was a problem sending your message. Please try later.
Your message has been sent. Thank you for sharing information about your award with the Lee Honors College!