Script
You can send an email in a craftform script:
mail
You can send an email in a craftform script:
async def generate_signature(
ctx: CraftContext,
) -> GenerateSignatureStatus:
await mail_send(
subject='Welcome',
body='Ci-joint un fichier !',
to='philippe@entzmann.name',
attachments=[ f"{ctx.temp_folder}/out.pdf" ],
)
The craft ref.common.pp-procedure.craftforms.mail.mail.craftform
contains a working example.
Note that the normal behaviour is to handle email notification in the finalize actions and not in the script !