Page 1 of 1

CDO email with signature

Posted: Thu Dec 14, 2017 5:36 pm
by Wanderson
Hi,

I use CDO to send emails, is possible send with a signature, in this case a jpg image?

Thanks in advance.

Re: CDO email with signature

Posted: Thu Dec 14, 2017 5:48 pm
by karinha

Code: Select all

             IF IMAGEM = "S" // Assinatura Digital no Email. Joao

                // NO RODAPE DA MENSAGEM.. EU SOU PLORIDA,,, KKKKKKKKKKK
                oCfg:HTMLBody = "<p>"+ALLTRIM( cMsg )+"</p>" + "<p><img src='cid:id_imagen10'></p>"

                loBP := :AddRelatedBodyPart( cDirPleno + "\LOGO.JPG", "id_imagen10", 1)

                WITH OBJECT loBP:Fields // Assinatura Digital no Corpo do Email

                   // oCfg:Item("urn:schemas:mailheader:Content-ID") = "id_imagen10" // Asi, genera WARNINGS
                   oCfg:Item("urn:schemas:mailheader:Content-ID"):Value :=  "id_imagen10"  // Asi, no.

                   oCfg:Update()

                END WITH

             ENDIF
 

Re: CDO email with signature

Posted: Fri Dec 15, 2017 4:19 pm
by Wanderson
karinha wrote:

Code: Select all

             IF IMAGEM = "S" // Assinatura Digital no Email. Joao

                // NO RODAPE DA MENSAGEM.. EU SOU PLORIDA,,, KKKKKKKKKKK
                oCfg:HTMLBody = "<p>"+ALLTRIM( cMsg )+"</p>" + "<p><img src='cid:id_imagen10'></p>"

                loBP := :AddRelatedBodyPart( cDirPleno + "\LOGO.JPG", "id_imagen10", 1)

                WITH OBJECT loBP:Fields // Assinatura Digital no Corpo do Email

                   // oCfg:Item("urn:schemas:mailheader:Content-ID") = "id_imagen10" // Asi, genera WARNINGS
                   oCfg:Item("urn:schemas:mailheader:Content-ID"):Value :=  "id_imagen10"  // Asi, no.

                   oCfg:Update()

                END WITH

             ENDIF
 
It's work, thank you!