First your code has a small issue. End of this line you are missing a semicolon.
header("Location: index.php?mailsend")
And then you have to study more about this. Check this thread they posted before.
How can I send an email using PHP?