Ver Mensaje Individual
  #1 (permalink)  
Antiguo 23/11/2017, 21:00
Avatar de damid3
damid3
 
Fecha de Ingreso: noviembre-2012
Mensajes: 90
Antigüedad: 11 años, 5 meses
Puntos: 0
Pregunta Al mandar mail tira error Prompt

Hola gente hace mucho q no posteo pero tengo un problem q me esta volviendo loco XD

hace rato q estoy tratando de mandar un mail pero me da

"el argumento prompt no puede ser tipo string"

pero no encuentro el porque

mi codigo :
Código vb:
Ver original
  1. Dim Message As New System.Net.Mail.MailMessage()
  2.         Dim SMTP As New System.Net.Mail.SmtpClient
  3.         Message.From = New System.Net.Mail.MailAddress("[email protected]", "Server", System.Text.Encoding.UTF8) 'Quien envía el e-mail
  4.        SMTP.Host = "smtp.gmail.com"
  5.         SMTP.Port = 587
  6.         SMTP.EnableSsl = True
  7.         SMTP.UseDefaultCredentials = False
  8.         Message.[To].Add("[email protected]")
  9.         SMTP.Credentials = New System.Net.NetworkCredential("[email protected]", "xxxxxxxx")
  10.         Message.Subject = "Back Up" 'Motivo o Asunto del e-mail
  11.        Message.SubjectEncoding = System.Text.Encoding.UTF8 'Codificacion
  12.        Message.Body = "BU"
  13.         Message.Priority = System.Net.Mail.MailPriority.Normal
  14.         Message.IsBodyHtml = True
  15.         Dim adjuntar As New Net.Mail.Attachment("C:\bu_" & Replace(Today, "/", "_") & ".zip")
  16.         Message.Attachments.Add(adjuntar)
  17.         'ENVIO
  18.        Try
  19.             Cargar_Mail_Espere.Show()
  20.             SMTP.Send(Message)
  21.         Catch ex As System.Net.Mail.SmtpException
  22.             Cargar_Mail_Espere.Close()
  23.             MsgBox(ex)
  24.         End Try

si alguno tiene algun consejo es bienvenido !!! Saludos !