private void button1_Click(object sender, EventArgs e) { var sg = new SendGridmail(); this.textBox1.Text = sg.sendmail(); }