Send mail
Hello,
I have a question about sending mail.
I have created a button to send mail and it works properly :
let myPdf := printAndSaveRecord(this, "ACCUSE DE RECEPTION");
let myName := "ACCUSE DE RECEPTION.pdf";
importFile(this, myPdf, myName);
let reply := dialog("Souhaitez-vous envoyer l'accusé de réception du courriel par mail ?", "", ["Oui", "Non"]);
if reply = "Oui" then
sendEmail({
from: userEmail(),
to: CANDIDATS.MAIL,
bcc: "candidats@aisuccle",
subject: "ACCUSE DE RECEPTION DE DEPÔT DE CANDIDATURE",
text: " ",
attachments: files(this),
html: CANDIDATS.'CIVILITÉ' + " " + CANDIDATS.NOM + "," + "<br><br>" + "Nous vous prions de trouver, en pièce jointe, l'accusé de réception de votre dépôt de candidature à la liste des candidats-locataires de l'Agence Immobilière Sociale Uccloise (A.I.S.U)" + "<br><br>" + "Nous restons à votre entière disposition pour toutes questions complémentaires." + "<br><br>" + "Bien à vous," + "<br>" + "A.I.S.U TEAM" + "<br><br><br>"
}) + alert("Votre courriel a bien été envoyé")
else
alert("Veuillez alors envoyer votre attestation par courrier recommandé !")
end
But I would like to create a second button to send the second layout. Unfortunately, in the script of my second button, it sends the first and the second layout... I suppose my problem is in the line 'attachments' but I do not know how to solve the question.
Any idea ?
3 replies
-
Try:
---
attachments: first(files(this)),
---
OR
---
attachments: last(files(this)),
---
if you have more than two attachements you have to figure out which one in the row is the right one and use
---
attachments: item(files(this),'index of the attachement'-number),
---
Steven
-
Sorry, that last one wasn't very clear:
attachments: item(files(this),'index of the attachement'-number),
an example of this :
attachments: item(files(this),2),
for the third attachement in row.
Steven.
-
Many thanks !!!!
Content aside
- 4 yrs agoLast active
- 3Replies
- 996Views