I would like to delete files in attachments once the email sent.
Here is my php code
Code: Select all
$file = "#filename#"; // get Filename
$filename = basename($file); // file name only
$to_email ="#fac_client_email#";
if(file_exists($file)){
nuSendEmail($to_email,'$from_email','username','object','content',[$filename => $file],true);
nuDeleteFiles($file);
// Send E-Mail
}else{
nuDebug('Cannot send ' . $file);
}
Any idea ?
Many thanks,
Yves