Hello! I am not sure where to post this but hopefully this is right.
So basicly I watched a tutorial on how to make a form that sends to an email.
But now im having a problem. It wont send the email. It's pretty wierd because it worked before and now it doesn't work at all.
Here is the code,
The error that comes up is this:
I do really want to know what's wrong, it's so wierd because when i first made this, it worked perfectly but now it doesn't work anymore.
Just so you guys know, im sending the email to my own account.
So basicly I watched a tutorial on how to make a form that sends to an email.
But now im having a problem. It wont send the email. It's pretty wierd because it worked before and now it doesn't work at all.
Here is the code,
VB.NET:
Imports System.Net.Mail
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If TextBox1.Text = "" Then
MsgBox("ERROR")
Else
If TextBox2.Text = "" Then
MsgBox("ERROR")
Else
Dim message As New Net.Mail.MailMessage(Label4.Text, Label4.Text, Label6.Text, TextBox1.Text)
Dim smtp As New Net.Mail.SmtpClient("smtp.live.com", 587)
Dim credentials As New Net.NetworkCredential(Label4.Text, Label5.Text)
smtp.EnableSsl = True
smtp.Credentials = credentials
smtp.Port = 587
smtp.Host = "smtp.live.com"
smtp.Send(message)
MsgBox("Success")
End If
End If
End Sub
End Class
The error that comes up is this:
VB.NET:
Mailbox is not available. Server Response: 5.3.4 Requested action not taken;
To continue sending messages, please sign in to your account.
I do really want to know what's wrong, it's so wierd because when i first made this, it worked perfectly but now it doesn't work anymore.
Just so you guys know, im sending the email to my own account.