Art .. blz ??
Cara baixei o projeto só não entendi direito. Eu tenho um fonte aqui de VbsendMail só que ele não está enviando.
você pode me ajudar ?
Segue abaixo:
Private Sub EnviarEmail()
' *****************************************************************************
' This is where all of the Components Properties are set / Methods called
' *****************************************************************************
Screen.MousePointer = vbHourglass
With poSendMail
' **************************************************************************
' Optional properties for sending email, but these should be set Min
' 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 = "mailserver.hoepers.com" ' Required the fist time, optional thereafter
.SMTPHost = "192.168.0.252"
.From = Trim(rsEnviarEmail!des_email_unida) ' Required the fist time, optional thereafter
If Trim(rsEnviarEmail!nom_exibi_email & " ") = "" Then
.FromDisplayName = Trim(rsEnviarEmail!des_email_unida)
Else
.FromDisplayName = Trim(rsEnviarEmail!nom_exibi_email)
End If ' Optional, saved after Min use
.Recipient = dbcdestinatario.BoundText ' Required, separate multiple entries with delimiter character
.RecipientDisplayName = dbcdestinatario.Text 'Optional, separate multiple entries with delimiter character
'If dbcCC.BoundText = "" Then
'.CcRecipient = txtCc ' Optional, separate multiple entries with delimiter character
'.CcDisplayName = txtCcName
'Else
'.CcRecipient = dbcCC.BoundColumn ' Optional, separate multiple entries with delimiter character
'.CcDisplayName = dbcCC.Text ' Optional, separate multiple entries with delimiter character
'End If
'.BccRecipient = txtBcc ' Optional, separate multiple entries with delimiter character
'.ReplyToAddress = txtFrom.Text ' Optional, used when different than 'From' address
.Subject = Trim(rsEnviarEmail!cod_unid) & " - SACC - " & _
Controledecheques.StatusBar1.Panels(2).Text ' Optional
.Message = "*******************************************************" & _
vbCrLf & _
"Atenção!!! Não responda esta mensagem!!!" & _
vbCrLf & _
"*******************************************************" & _
vbCrLf & vbCrLf & _
"O usuário " & Trim(Controledecheques.StatusBar1.Panels(2).Text) & _
" da filial " & Trim(rsEnviarEmail!cod_unid) & _
" lhe enviou está Solicitação de cheque devolvido por e-mail!!!" & _
vbCrLf & vbCrLf & _
"Produto: " & frmpesq.dbccredor.Text & _
vbCrLf & _
"Numero do cheque: " & Val(txtcodigo.Text) & _
vbCrLf & _
"Cpf: " & Trim(txtcpfcliente.Text) & _
vbCrLf & _
"Vencimento: " & Trim(txtvencimentochq.Text) & _
vbCrLf & _
"Valor: " & Format(txtvalorchq.Text, "#,##0.00")
'.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 = HIGH_PRIORITY ' Optional, default = PRIORITY_NORMAL
'.Receipt = bReceipt ' Optional, default = FALSE
.UseAuthentication = True ' Optional, default = FALSE
'.UsePopAuthentication = bPopLogin ' Optional, default = FALSE
.UserName = rsEnviarEmail!nom_user_email ' Optional, default = Null String
.Password = rsEnviarEmail!des_senha_email_unida ' Optional, default = Null String, value is NOT saved
'.POP3Host = "172.16.4.5"
.MaxRecipients = 100 ' Optional, default = 100, recipient count before error is raised
' **************************************************************************
' 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
LimpaValoresGravados
End With
Screen.MousePointer = vbDefault
End Sub