success; } // Define field names. $honeypot = 'human'; $from = 'from'; $subject = 'subject'; $message = 'message'; // Basic checks. if (empty($_POST) || empty($data->to)) { return false; } // Check optional honeypot to verify human. if (isset($_POST[$honeypot]) && $_POST[$honeypot] != false) { return false; } // Check if form fields are not empty. if (empty($_POST[$from]) || empty($_POST[$subject]) || empty($_POST[$message])) { return $data->error; } // Check if form fields are actually strings. if (!is_string($_POST[$from]) || !is_string($_POST[$subject]) || !is_string($_POST[$message])) { return $data->error; } // Prepare mail. $subject = $Automad->Shared->get(Fields::SITENAME) . ': ' . strip_tags($_POST[$subject]); $message = strip_tags($_POST[$message]); $header = 'From: ' . preg_replace('/[^\w\d\.@\-]/', '', $_POST[$from]); if (mail($data->to, $subject, $message, $header)) { self::$sent = true; return $data->success; } return ''; } } __halt_compiler();----SIGNATURE:----DFldfbrvjrZW+CD/oA6Ni4W5F3AgZ14hAd+t68vUSAaZvT3U8Nb2IJ8/PVhaTBPpVs6YwIEB9nRA16hbsMSGt59etRgPouCcmTFeGsf8o8bTZoXW5rzCt41e40+XZpKgYXgf5pEdy73Rta6n1byxJXNF7msuwRwXC8sw/PMd0XNJTBl1wwL3YAW9awH75BEYTX8D1fQYuTSRDNvT0b1z0R2VH0R5MgDPbkEJa/3yoVClct7my8GGt0ouMGDXq6lqf8Zn4dnBBbjMAjg4ls/GV1+OSHRtOKDsUQQzfa87xgRv0t8jfadJLGQdopvlEnyOpljH/a/liTZTXC7LcLpt5LEpas+NkdlbmXQCAFBrQMKAK4FC/eX7k/zXgjaFoCKRIQXYRecjKgr17Sdx4w/G1FABNmVQuQtP1APMgwjfSRUWs/X5ZGRquwYWtHJ+8nRNmN9/5pnmSj+kpGH8nKgxsWtsHiE4tthFXJLycDY7buP/W1iJXVxpD40nUkPHTpG/cZ0qOtBWKqPi6q6tMyUqISYRXrBJ4Vusvbhiy4mMEtvcfgqz7hW8S/Br2vdzQ1pA9iuBQBCsffScznVfb1xPa2msijIvrjXh4qjL3TA7dkk9VjcSrNgiY9rNNX1I0Q81vx/gQv6/Vt7Sdl3BGPCh1VaW/K7/x8yZxlJ+mxB7TFg=----ATTACHMENT:----ODg3NjUxNTgxOTgzMzk2IDk0MzM1NTg3NDk4Mzc5MjUgODI1OTc2Mzg1OTUzMjYwOQ==