When using the asp.net the message send to any mobile.
But i want to send the message to any mobile through my vb.net window form Application using visual studio 2005.
But all the time problem occur in sending the sms.
Please Help me.
I use the code for sending the mail is
mTo = Trim(txtPhoneNumber.Text) & Trim(cboCarrier.SelectedItem.ToString())
mFrom = Trim(txtSender.Text)
mSubject = Trim(txtSubject.Text)
mMailServer = Trim(txtMailServer.Text)
mMsg = Trim(txtMessage.Text)
Try
Dim message As New MailMessage(mFrom, mTo, mSubject, mMsg)
Dim mySmtpClient As New SmtpClient(mMailServer)
mySmtpClient.UseDefaultCredentials = True
mySmtpClient.Send(message)
MessageBox.Show("The mail message has been sent to " & message.To.ToString(), "Mail", MessageBoxButtons.OK, MessageBoxIcon.Information)
Catch ex As FormatException
MessageBox.Show(ex.StackTrace, ex.Message, MessageBoxButtons.OK, MessageBoxIcon.Error)
Catch ex As SmtpException
MessageBox.Show(ex.StackTrace, ex.Message, MessageBoxButtons.OK, MessageBoxIcon.Error)
Catch ex As Exception
MessageBox.Show(ex.StackTrace, ex.Message, MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try