-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f216022
commit b0cb839
Showing
1 changed file
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
if ($_SERVER["REQUEST_METHOD"] == "POST") { | ||
$name = $_POST["name"]; | ||
$email = $_POST["email"]; | ||
$project = $_POST["project"]; | ||
$message = $_POST["message"]; | ||
|
||
// You can customize the email content and recipient | ||
$to = "email@example.com"; | ||
$subject = "New Contact Form Submission"; | ||
$message_body = "Name: $name\nEmail: $email\nProject: $project\nMessage:\n$message"; | ||
|
||
// Send the email | ||
if (mail($to, $subject, $message_body)) { | ||
echo "Message sent successfully."; | ||
} else { | ||
echo "Message sending failed."; | ||
} | ||
} | ||
?> |