You need to send back a message to contactus.php which allows you to tell the difference between a successful and failed message, you can do this with a query string (?name=value).
$qry = "insert into contactus(name,email,subject,message) values('$name','$email','$subject','$message')";
Add this to the top of contactus.php
$status = $_GET['status'];
echo ($status == sent) ? 'Your message was successfully sent.':'Could\\'nt send your message.';