I want to get help with how to send the console output via email on a click button function in my program.
The variable textBox2.Text
contains the text that is being printed out to the console and I want this text to be send automatically on the (button1_Click_1
) function.
I have found some solutions on somewhat similar questions but none of them seem to work, I hope I can find a solution here.
My code:
private void textBox2_TextChanged(object sender, EventArgs e)
{
Console.WriteLine(textBox2);
}
private void button1_Click_1(object sender, EventArgs e)
{
//Sending email function with the console output that is being printed from (textBox2.Text) should be here.
Taskbar.Show();
System.Windows.Forms.Application.Exit();
}