Got it to work Thanks
It works well and even got it to send a text massage to my phone.
Here is the code I came up with.
]Code:
Dim MSG_Body As String = "empty"
Public Sub SMS_Value_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SMS_Value.TextChanged
Dim Text_Case As Integer = 0
Text_Case = SMS_Value.Text
Select Case Text_Case
Case 1
MSG_Body = "Front Door Opened"
Case 2
MSG_Body = "Back Door Opened"
Case 3
MSG_Body = "Garage Opened"
Case Else
MSG_Body = "No Case"
End Select
TextBox2.Text = MSG_Body
If Text_Case <> "0" Then
Call SMSMSG()
End If
End Sub
Public Sub SMSMSG()
Try
Dim message As New Net.Mail.MailMessage
Dim smtp As New Net.Mail.SmtpClient
smtp.EnableSsl = True
message.To.Add("
[email protected]")
message.From = New Net.Mail.MailAddress("
[email protected]")
message.Subject = "LOG UPDATE"
message.Body = MSG_Body
message.CC.Add("
[email protected]")
' Can find a list of sms cell carriers online
smtp.Host = "smtp.mail.yahoo.com"
smtp.Port = "587"
' This was not the corect port that Yahoo had said I mucked around with this for hours think this was a recommended Gmail port
smtp.Credentials = New Net.NetworkCredential("
[email protected]", "Password")
smtp.Send(message)
'smtp. find mail was sent (need to find for confirmation)
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub