Here's the code you should enter in C++ for the "Send" button (I made this on VB.NET):
{ MailMessage ^Mail = gcnew MailMessage(); Mail->Subject = TextBox2->Text; //this is the subject of the message Mail->To.Add(TextBox4->Text); //this is for the "To" e-mail Mail->From = gcnew MailAddress(TextBox1->Text); //this is your g-mail Mail->Body = TextBox3->Text; //this is the message SmtpClient ^SMTP = gcnew SmtpClient("smtp.gmail.com" ) ; SMTP->EnableSsl = true; SMTP->Credentials = gcnew System::Net::NetworkCredential(TextBox1->Text, MaskedTextBox1->Text); //this is your g-mail and its password SMTP->Port = 587; SMTP->Send(Mail); } ---------------------------------------------------------------------------------------- and you should put this before "private ref class Form1 : System::Windows::Forms::Form":