Hola utilizo un modulo de clase de sendmail (sendmail.cls), que descargue con un ejemplo, e intento enviar un mail con gmail.
Utilizo el servidor smtp.gmail.com, mi usuario y contraseña y también
.UseAuthentication = bAuthLogin (TRUE)
pero me da error:
Must issue a STARTTLS command firts.
Supongo que tiene que ver con SSL pero no encontre ninguna propiedad donde pueda poner SSL = True
Si utilizo un dominio propio que no requiere atentificacion ni SSL anda muy bien pero con gmail o hotmail no puedo hacerlo:
Este es el ejemplo:
Código vb6:
Ver originalGracias por su ayuda
Private Sub cmdSend_Click()
' *****************************************************************************
' This is where all of the Components Properties are set / Methods called
' *****************************************************************************
cmdSend.Enabled = False
lstStatus.Clear
Screen.MousePointer = vbHourglass
With poSendMail
' **************************************************************************
' Optional properties for sending email, but these should be set first
' if you are going to use them
' **************************************************************************
.SMTPHostValidation = VALIDATE_NONE ' Optional, default = VALIDATE_HOST_DNS
.EmailAddressValidation = VALIDATE_SYNTAX ' Optional, default = VALIDATE_SYNTAX
.Delimiter = ";" ' Optional, default = ";" (semicolon)
' **************************************************************************
' Basic properties for sending email
' **************************************************************************
.SMTPHost = txtServer.Text ' Required the fist time, optional thereafter
.From = txtFrom.Text ' Required the fist time, optional thereafter
.FromDisplayName = txtFromName.Text ' Optional, saved after first use
.Recipient = txtTo.Text ' Required, separate multiple entries with delimiter character
.RecipientDisplayName = txtToName.Text ' Optional, separate multiple entries with delimiter character
.CcRecipient = txtCc ' Optional, separate multiple entries with delimiter character
.CcDisplayName = txtCcName ' Optional, separate multiple entries with delimiter character
.BccRecipient = txtBcc ' Optional, separate multiple entries with delimiter character
.ReplyToAddress = txtFrom.Text ' Optional, used when different than 'From' address
.Subject = txtSubject.Text ' Optional
.Message = txtMsg.Text ' Optional
.Attachment = Trim(txtAttach.Text) ' Optional, separate multiple entries with delimiter character
' **************************************************************************
' Additional Optional properties, use as required by your application / environment
' **************************************************************************
.AsHTML = bHtml ' Optional, default = FALSE, send mail as html or plain text
.ContentBase = "" ' Optional, default = Null String, reference base for embedded links
.EncodeType = MyEncodeType ' Optional, default = MIME_ENCODE
.Priority = etPriority ' Optional, default = PRIORITY_NORMAL
.Receipt = bReceipt ' Optional, default = FALSE
.UseAuthentication = bAuthLogin ' Optional, default = FALSE
.UsePopAuthentication = bPopLogin ' Optional, default = FALSE
.Username = txtUserName ' Optional, default = Null String
.Password = txtPassword ' Optional, default = Null String, value is NOT saved
.POP3Host = txtPopServer
.MaxRecipients = 100 ' Optional, default = 100, recipient count before error is raised
.SMTPPort = 587
' **************************************************************************
' Advanced Properties, change only if you have a good reason to do so.
' **************************************************************************
' .ConnectTimeout = 10 ' Optional, default = 10
' .ConnectRetry = 5 ' Optional, default = 5
' .MessageTimeout = 60 ' Optional, default = 60
' .PersistentSettings = True ' Optional, default = TRUE
' .SMTPPort = 25 ' Optional, default = 25
' **************************************************************************
' OK, all of the properties are set, send the email...
' **************************************************************************
' .Connect ' Optional, use when sending bulk mail
.Send ' Required
' .Disconnect ' Optional, use when sending bulk mail
txtServer.Text = .SMTPHost ' Optional, re-populate the Host in case
' MX look up was used to find a host End With
End With
Screen.MousePointer = vbDefault
cmdSend.Enabled = True
End Sub
También he probado esto mismo con un ocx llamado mail.ocx , no tiene la propiedad de SSL y me da el mismo error
gracias