I'm trying to send an email using C++/Cli through gMAil ... This is the code but it is not working , any suggestions?
MailMessage^ email=gcnew
MailMessage("from@From.com","to@to.com","SUBJECT","MESSAGE");
SmtpClient^ smtp=gcnew SmtpClient("smtp.gmail.com", 587);
smtp->EnableSsl=true;
smtp->UseDefaultCredentials = false;
smtp->Credentials = gcnew
System::Net::NetworkCredential("from@from.com","password");
smtp->Send(email);