0

Does anyone know if there's a way for me to access the port in my computer using C#, so i can access a cellphone connected to it? THNX

3
Contributors
2
Replies
10
Views
10 Years
Discussion Span
Last Post by Thobani_1
0

Why not use the MS SMS sender? It can be called like any onther app taking arguments from the command line. Once configured it can use a cell phone via cable or bluetooth... ;)

Cheers
Lars Hoygaard

-1
try
{
    MailMessage message = new MailMessage();
    message.To.Add("1568235685@sms.sancharnet.in");
    message.From = new MailAddress("sameone@gmail.com"); //See the note afterwards...
    message.Body = "Hi, How r you ?";

    SmtpClient smtp = new SmtpClient("smtp.gmail.com");
    smtp.EnableSsl = true;
    smtp.Port = 587;
    smtp.DeliveryMethod = SmtpDeliveryMethod.Network;
    smtp.Credentials = new NetworkCredential("someonet@gmail.com", "password");

    smtp.Send(message);
    MessageBox.Show("Message sent successfully");
}
catch (Exception ex)
{
    MessageBox.Show(ex.Message, "Error");
}
Votes + Comments
Watch out for old threads. Leave them be.
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.