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

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

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");
}
commented: Watch out for old threads. Leave them be. -2
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.