Try this one
Response.Write(@"<script language='javascript'>alert('Mail sent successfully.');</script>");
Or, if you are using Update panel then try this one..
ScriptManager.RegisterStartupScript(this, GetType(), "startprocesskey", "alert('Mail sent successfully.')", true);