I have a script, let's call it page1, that checks if a file(attachment.pdf) exists, generates email, attaches pdf and sends it out.
I also have a separate script that generates the PDF file that becomes and attachment.
Now, my dilemma is: if the files doesn not exists, how do I run the script that generates PDF and then return back to the top of page1 and runs it all over, i.e. sees pdf file, attaches and emails?
How do I do it all from withing page1?