网站邮箱

I have a "Contact us" form in my website with the mailto: function. The mail goes to my yahoo account. I want to implement a mailbox in my website such that i can receive those mail directly from the admin page and reply or delete them accordingly.

How I can do that?

I already have the template I need an explanation on the functions and dynamic content to be implemented.

enter image description here

This is the sample of my code .. I have change some variable name here ..

$sql = "SELECT * FROM request where user_id='$user'";
$result = $conn->query($sql);
$sr=1;
if ($result->num_rows > 0) {
    // output data of each row
    while($row = $result->fetch_assoc()) {
        $sender_id=$row["sender_id"];
        $receiver_id=$row["receiver_id"];
        $req=$row['req_id'];
        $stat=$row['status'];
        if($stat==0){
            $status="Pending...";
        }
        elseif ($stat==1) {
             $status="Accepted.";
        }
        elseif ($stat==2) {
            $status="Rejected.";
        }
        $sql1 = "SELECT * FROM usertable1 where id='$sender_id' ";
        $result1 = $conn->query($sql1);
        if ($result1->num_rows > 0) {
            // output data of each row
            while($row1 = $result1->fetch_assoc()) {
                $username=$row1['user_name'];
                $email=$row1['email'];
            }
        }
        $sql2 = "SELECT * FROM  usertable2 where id='$receiver_id' ";
        $result2 = $conn->query($sql2);
        if ($result2->num_rows > 0) {
            // output data of each row
            while($row2 = $result2->fetch_assoc()) {
                $source=$row2['source'];
                $destination=$row2['destination'];
            }
        }

you will get an idea from this so you can implement as per your requirement.

</div>