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

Questions related to using nuBuilder Forte.

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

Unread postby kev1n » Tue Jun 01, 2021 12:53 am

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);
}
kev1n
nuBuilder Team
 
Posts: 1873
Joined: Mon Oct 15, 2018 2:13 am
nuBuilder Version: 4.5

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

Unread postby oli » Tue Jun 01, 2021 1:48 am

Thank you! Now it works.
oli
 
Posts: 70
Joined: Sat Mar 20, 2021 11:52 pm
nuBuilder Version: 4.5

Previous

Return to General

Who is online

Users browsing this forum: No registered users and 12 guests