Uniface User Forum

 View Only
  • 1.  Emailing with DKIM / Uniface 10.4

    Posted 05-13-2024 03:41

    Hi,

    When we use UPOPMAIL to send a mail on an Office365 account, the mail does not respect DKIM conditions : If the receiver applies DKIM condition, the mail sent by UPOPMAIL is spamed. Here is the code we use :

    newinstance "UPOPMAIL", hPopmail

    hPopmail->SetSecurity("SMTP=UStartTLSSMTPUSE=MAND", "")
    HPOPMAIL->SetSecurity("SMTP=UAuthLoginSMTPUSE=opt","USER=%%FROM.BIDON%%%PASSWORD=%%FROM_MDP.BIDON%%%")

    vSmtpServer = "smtp-mail.outlook.com+587"
       
    hPopmail->LogonSmtp(vSmtpServer, "", "")
    If ($Status >= 0)
        ; Specify the mail header information
        hPopmail->SetFrom("%%FROM.BIDON%%%")
        hPopmail->SetToList("%%TO.BIDON%%%")
        hPopmail->SetSubject("Envoi depuis Uniface 10 - %%$$CODECLI")
        ; Specify the message body
        hPopmail->SetMessage("Ceci est un mail envoyé depuis smtp.office365.com", "")  ; plain text body
        hPopmail->Send("IgnoreRcptError=True")
    EndIf

    We get a 0 $Status, the mail is correctly sent but DKIM informations are not OK.

    Should I send an other parameter before the final "Send" command ?

    Regards,

    Jérémie.



    ------------------------------
    Jérémie CEDOLIN
    Proges Plus
    Willems FR
    ------------------------------


  • 2.  RE: Emailing with DKIM / Uniface 10.4

    Posted 05-20-2024 11:03
    Edited by Juliano Anoar Haoach Garcia 05-20-2024 11:03

    Morning,

    Try send MIMEType 

    "MIMEType=text/plain" or "MIMEType=text/html"
    hPopmail->SetMessage("Message", "MIMEType=text/html")



    ------------------------------
    Juliano Anoar Haoach Garcia
    Suport Analyst
    Coamo Agroindustrial Cooperativa
    Campo Mourão BR
    ------------------------------