Hello,
nuBuilder is great, thanks to the developer(s)!
I'm developing a web application that allows to send emails to customers. There's a also possibility to pick a document which will be sent along. This works fine so far. Now I've encountered a strange problem: The attachment was sent the first time. The next time, however, the attachment did not come along. I'm at a real loss. What could be the reason?
Welcome to the nuBuilder Forums!
Register and log in to access exclusive forums and content available only to registered users.
Register and log in to access exclusive forums and content available only to registered users.
email with attachment
-
- Posts: 36
- Joined: Sat Jun 02, 2018 1:26 pm
Re: email with attachment
Hi again,
Some additional information: The documents to be attached to the email are stored on the server. (like file1.pdf, file2.pdf, file3.pdf ...)
After some further investigations I found the file no longer exists on the server after the first email has been sent using nuSendEmail function.
How to prevent this from happening? The function is not supposed to wipe documents on the server.
Some additional information: The documents to be attached to the email are stored on the server. (like file1.pdf, file2.pdf, file3.pdf ...)
After some further investigations I found the file no longer exists on the server after the first email has been sent using nuSendEmail function.
How to prevent this from happening? The function is not supposed to wipe documents on the server.
-
- Posts: 785
- Joined: Sun Oct 14, 2018 11:25 am
Re: email with attachment
Amit,
This is how the function works
A function should do exactly what is suggested by its name, no more.
Here's the link to the old topic and a kind of fix:
https://forums.nubuilder.cloud/viewtopic. ... ink#p16108
My suggestion to change the function remained uncommented.
This is how the function works

A function should do exactly what is suggested by its name, no more.
Here's the link to the old topic and a kind of fix:
https://forums.nubuilder.cloud/viewtopic. ... ink#p16108
My suggestion to change the function remained uncommented.
Well... even though I have a solution, maybe you can consider my suggestion to change the behaviour of nuSendEmail()-
(Or to add a parameter like "delete_source_files_after_sending" with true --> unlink() and false --> don't delete the source files )