IMAGEM CORPO EMAIL

DRVL 06/10/2022 13:10:49
#500564
Bom dia!

Preciso enviar email em VB6 com uma imagem no corpo junto com alguns dizeres. Utilizo a dll vbsendmail.dll e somente com dizeres em html funciona sem problemas. Mas a imagem que insiro no corpo não vai.
Procurei aqui no forum algo relacionado, mas não encontrei.
Vi outras opções de envio de email, mas não obtive sucesso tambem.

--------------------------------------------------------------------------
--> O código que criei foi esse.
v_msg_boleto = "Segue em anexo boleto referente pedido de venda n. "
v_msg_boleto = v_msg_boleto & "123456" & " de " & "14/09/2022"
v_msg_boleto = v_msg_boleto & " solicitado com a vendedora " & "Maria Jose de Jesus"

v_msg_boleto = v_msg_boleto & "<br>"
v_msg_boleto = v_msg_boleto & "<br>"
v_msg_boleto = v_msg_boleto & "<B>" & "ATENÇÃO ANTES DE EFETUAR O PAGAMENTO!" & "</B>"
v_msg_boleto = v_msg_boleto & "<br>"
v_msg_boleto = v_msg_boleto & "<br>"
v_msg_boleto = v_msg_boleto & "A fraude de boletos bancários é mais comum do que se imagina."
v_msg_boleto = v_msg_boleto & " Pensando nisso, trazemos alguns avisos para que voce possa proteger seu dinheiro de qualquer fraude:"
v_msg_boleto = v_msg_boleto & "<br>"
v_msg_boleto = v_msg_boleto & "<br>"
v_msg_boleto = v_msg_boleto & "Verifique sempre se os dados do código de barras conferem com as nossas informações contidas no corpo do boleto, conforme a orientação de cores no exemplo do boleto abaixo:"
v_msg_boleto = v_msg_boleto & "<br>"
v_msg_boleto = v_msg_boleto & "<br>"

v_msg_boleto = v_msg_boleto & "<img src=C:\ImagemBoletoCorpoEmail.bmp>"

v_msg_boleto = v_msg_boleto & "<br>"
v_msg_boleto = v_msg_boleto & "<br>"
v_msg_boleto = v_msg_boleto & "Em caso de dúvida por favor entre em contato."
v_msg_boleto = v_msg_boleto & "<br>"
v_msg_boleto = v_msg_boleto & "Antecipadamente agradeço"

--------------------------------------------------------------------------
--> Na rotina do envio

With poSendMail

" **************************************************************************
" Set the basic properties common to all messages to be sent
" **************************************************************************
.SMTPHost = g_smtp_email " Required the fist time, optional thereafter
.SMTPPort = g_porta_email
.From = g_usuario_aut " Required the fist time, optional thereafter
.FromDisplayName = "Sistema " & G_Nome_Fantasia " Optional, saved after first use
.AsHTML = True
.Message = v_msg_boleto
If p_Attachment <> "" Then
.Attachment = p_Attachment
End If
"***************************************************

.UseAuthentication = bAuthLogin " Optional, default = FALSE
.username = p_user_autentic " Optional, default = Null String
.password = p_senha_autentic " Optional, default = Null String, value is NOT saved

" get the message count and set the timer
lCount = 1 "Nro de envios
If lCount = 0 Then Exit Sub
t! = Timer

" **************************************************************************
" Send the mail in a loop. In a real app you would need to load a new
" recipient from a file or database each pass through the loop.
" **************************************************************************
" send method only (normal button)
For lCtr = 1 To lCount
.Recipient = p_recipient ""durval.piffer@dpxsolucoes.com.br,durval.piffer@gmail.com"
.RecipientDisplayName = p_display_recipient " "Oçamento Signartec"
.Subject = p_subject
.Send
Next

-----------------------------------------------------------------------------------

Se alguem puder, agradeço a ajuda.

Obrigado
DRVL 06/10/2022 13:34:36
#500565
Resolvido da seguinte forma.

coloque na tag <img src=topo.jpg> somente o nome do arquivo.

Enviando como anexo a imagem.

email.Attachments.Add(New Attachment("C:    emp    opo.jpg"))
Faça seu login para responder