It works for me too! I wish I understood it better though. I now understand what an associative array is. One question is does the nuSendEmail() function loop through the array for multiple attachments? And since there are a lot of pieces that need to be put together from several threads, could a complete example be added to the code library for the next guy?
And finally, is there a way to change the name of the attached file to something more human friendly?
Hello Friends, Im in the same situation here, i have the file on temp folder, i want to change the name and send via e-mail. At this point its all working i can save the report, end send, the last thing a have to do is change the file name from nupdf_....pdf to something like, pdf_date.pdf, how can i do this?
$file = "#filename#"; // get Filename
$filename = basename($file); // file name only
// Create a new filename
$newFilename = 'new_' . $filename;
// Get the current directory
$currentDirectory = dirname($file);
// Rename the file
if (rename($file, $currentDirectory . DIRECTORY_SEPARATOR . $newFilename)) {
$file = realpath($currentDirectory . DIRECTORY_SEPARATOR . $newFilename);
$filename = basename($file); // file name only
}