Posting e-mailed data also to browser using Output Buffering
Posted: Tue Jan 11, 2011 4:43 pm
I use a shopping cart application that automatically generates and sends e-mail messages to confirm purchases as well as issue authorization codes for purchased downloads, however lately I've been getting so many code 550 (returned as possible spam) messages from my customer's e-mail servers that this process is no longer automatic or viable.
What I am trying to do is simply make the very same data that is e-mailed to become also available to the customer via their browser. This is necessary as a fail-safe for the communication process: to both preserve the automation and to eliminate any delays as well as the manual intervention now necessary to insure that most communication is even received by my customers!
My idea was perhaps doing so by creating a PHP output buffer content of this customer e-mail data to be stored from the current output line and then implementing a call from the PHP output buffer of this same data into a simple PHP "template" page such to generate a dynamic post-payment confirmation "thank you" page.
This page could then be delivered immediately to the browser... containing all of the user data (mirrored from the generated e-mail)... to replace my current static post-payment confirmation "thank you" page.
In summary: I'm trying to take some generated data that has been outputted via PHP to e-mail... save this into a PHP output buffer... then recall this same data into a webpage (template) for display into a browser such that my customer receives both an e-mail of the data (this already occurs) in addition to displaying this same data to their browser (this needs to occur).
Does this make sense? Is it possible? Does anyone know how to PHP code something like this?
Is seems that I would have to modify the current page containing the e-mail output statement with a buffer command to contain the data, then create a page to recall and display the buffered output data.
Is this pure folly, or a practical, easily code-able solution?
I'm even willing to compensate via PayPal someone who can implement this action via coding!
Thanks so much for your attention and any clues or assistance.
-Rich-
What I am trying to do is simply make the very same data that is e-mailed to become also available to the customer via their browser. This is necessary as a fail-safe for the communication process: to both preserve the automation and to eliminate any delays as well as the manual intervention now necessary to insure that most communication is even received by my customers!
My idea was perhaps doing so by creating a PHP output buffer content of this customer e-mail data to be stored from the current output line and then implementing a call from the PHP output buffer of this same data into a simple PHP "template" page such to generate a dynamic post-payment confirmation "thank you" page.
This page could then be delivered immediately to the browser... containing all of the user data (mirrored from the generated e-mail)... to replace my current static post-payment confirmation "thank you" page.
In summary: I'm trying to take some generated data that has been outputted via PHP to e-mail... save this into a PHP output buffer... then recall this same data into a webpage (template) for display into a browser such that my customer receives both an e-mail of the data (this already occurs) in addition to displaying this same data to their browser (this needs to occur).
Does this make sense? Is it possible? Does anyone know how to PHP code something like this?
Is seems that I would have to modify the current page containing the e-mail output statement with a buffer command to contain the data, then create a page to recall and display the buffered output data.
Is this pure folly, or a practical, easily code-able solution?
I'm even willing to compensate via PayPal someone who can implement this action via coding!
Thanks so much for your attention and any clues or assistance.
-Rich-