Code: Detail

VisualBasic6.0 - (Portuguese)

Enviar email utilizando CDONTS

Envia email utilizando componente CDONTS

Last update: 17/12/2013
VisualBasic6.0  VB6     
 
N/A
N/A
N/A
N/A
 

Public Sub Envia_Mensagem_Email(ByVal De As String, ByVal Para As String, ByVal CC As String, ByVal Assunto As String, ByVal mensagem As String)

    On Error GoTo Erro
    
    Dim objEmail As Object
    
    Set objEmail = CreateObject("CDONTS.NewMail")
    
    objEmail.BodyFormat = 0
    objEmail.MailFormat = 0
    objEmail.From = De
    objEmail.To = Para
    If Trim(CC) <> "" Then objEmail.CC = CC
    objEmail.Subject = Assunto
    objEmail.Body = mensagem
    
    objEmail.send
    
    Set objEmail = Nothing
    
    Exit Sub
    
Erro:

    If Err = 429 Then
    
        MsgBox "Você não possui recursos de envio de e-mail!", vbExclamation
        
    End If

End Sub

Source:
 
Users who have marked this routine as a favorite
 
 
 
The site ti4fun is not responsible for the content on sites for which you have external links

Articles, routines, tips, forums, blogs or any other content posted on ti4fun site is not tested and not validated, so you should test and validate any information collected on the ti4fun site before applying it to final use environment, such as example, production. the TI4FUN site is not responsible for quality or for any damages, direct, indirect or consequential, from use of any content posted by the authors in the site.

All content published on the ti4fun site is the responsibility of the author and do not necessarily express the views of the site ti4fun and its employees.