you need to set
smtp.Credentials
and remove the line
smtp.UseDefaultCredentials = false;
NetworkCredential smtpCreds = new NetworkCredential("username", "pw");
SmtpClient smtp = new SmtpClient("smtp.gmail.com", 587);
smtp.EnableSsl = true;
smtp.Credentials = smtpCreds;
MailMessage mail = new MailMessage("xxxxxxxx@gmail.com", Emailtxt.Text, "Registration Details", bodytxt.Text);
smtp.Send(mail);