0

No attachment file in mail

Hi,

I would like to send an email with attachment file, the email is sended but no file attached !

this is my code

let myPdf := printAndSaveRecord(this, "DEPANNAGE");

let myName := "Fiche d'intervention" + " du " + 'Date du dépannage' + ".pdf";

importFile(this, myPdf, myName);

sendEmail({

from: "me@me.net",

to: CLIENT.'E-mail',

bcc: "me@me.net",

subject: "Fiche de dépannage d'alarme" + " du " + 'Date du dépannage',

text: "Le dépannage de votre système d'alarme est terminé, vous trouverez ci-joint la fiche d'intervention à placer dans le dossier d'alarme",

attachments: file(this, myName)

Is this correct and if yes why ?

1 reply

null
    • Jorg
    • 4 yrs ago
    • Reported - view

    Hi, 

    If you work in the Ninox App it takes a little time to save the imported attachment. During this time the following script is still running to the end will not find the attachment yet, as is has not arrived on his place then. 

    You could split the action in two actions (print and import document + send E-Mail) or

    you could implement a part in the script that results a little break or a time consuming so that the attachment is available when the script is searching for it

    or you could use the do as server function:

     

    do as server 

    ... script...

    end

    Kind regards, Jörg

Content aside

  • 4 yrs agoLast active
  • 1Replies
  • 1121Views