Donate. I desperately need donations to survive due to my health

Get paid by answering surveys Click here

Click here to donate

Remote/Work from Home jobs

Send SMS to phone to pc

I have done this code for send sms to phone. this code is working properly i don't receive any message. no exception is thrown either.

Here is what I have tried:

            MailMessage sendMessage = new MailMessage();
            sendMessage.From = new MailAddress("xxxx@gmail.com");

            SmtpClient smtp = new SmtpClient("smtp.gmail.com", 587);
            smtp.EnableSsl = true;
            NetworkCredential Credentials = new NetworkCredential("xxxx@gmail.com", "+xxxx");
            smtp.Credentials = Credentials;

            sendMessage.Subject = "Message";
            sendMessage.Body = "Testing Message is Success";
            sendMessage.To.Add("0777777777@sms.dialog.lk");
            smtp.Send(sendMessage);

I have done in C#. Can anyone say What is the problem??

Comments