Page 2 of 2

Re: How can I add a button for sending a report by email?

Unread postPosted: Tue Jun 01, 2021 12:53 am
by kev1n
You must pass an associative array for the file.

Code: Select all
$file = "#filename#";           // get Filename
$filename = basename($file);  // file name only

if(file_exists($file)){
    nuSendEmail('xxxxxxx@gmail.com',xxxxxxxx@xxxxxxx.de','From: Admin','Test E-Mail from ....','Your Order',[$filename => $file],true);    // Send E-Mail
}else{
    nuDebug('Cannot send ' . $file);
}

Re: How can I add a button for sending a report by email?

Unread postPosted: Tue Jun 01, 2021 1:48 am
by oli
Thank you! Now it works.