System.Net.Mail.MailMessage obj = new System.Net.Mail.MailMessage();
SmtpClient serverobj = new SmtpClient();
serverobj.Credentials = new NetworkCredential("anilmeets4u@gmail.com", "yourpassword");
serverobj.Port = 587;
serverobj.Host = "smtp.gmail.com";
serverobj.EnableSsl = false;
obj = new System.Net.Mail.MailMessage();
obj.From = new MailAddress("YourEmailId", "Google.com", System.Text.Encoding.UTF8);
obj.To.Add(ASPxtxtToUser.Text);
obj.CC.Add(ASPxTexttoCc.Text);
obj.Priority = System.Net.Mail.MailPriority.High;
obj.Subject = txtSubject.Text;
string date = DateTime.Now.ToString();
obj.Body = ASPxMemo1.Text;
serverobj.Send(obj);
lblsend.Text = "Your Message Send Sucessfully";
Its Works
Regards,
Anilkumar.D