I got this idea of making a mail sender. I tried to look for solutions but none really worked and they were badly explained or if it is even possible to do this?
So i basically have this if else code that check's if it's empty or not and if it's not it would send the value to mail.
using System.Net.Mail; //i think this is what i need? private void button1_Click(object sender, EventArgs e) { if(string.IsNullOrWhiteSpace(textBox1.Text) && string.IsNullOrWhiteSpace(textBox2.Text)) { MessageBox.Show("You're empty!"); } else if(Int32.Parse(textBox1.Text) != 0) { // send text box to mail } else { MessageBox.Show("Something went wrong."); System.Threading.Thread.Sleep(2000); MessageBox.Show("Closing"); System.Threading.Thread.Sleep(1000); this.Close(); } } Is someone willing to direct me in the correct direction or perhaps help me explain how to do it?