Save a local copy of email when sending from web form
For the first time in YEARS I am thinking about PHP -
My challenge is that I need to save a copy of emails sent from the mail-it.php form on my website to a local database. I am getting clients saying they have sent emails via the site and I've not received them so I want to be able to retrieve the email from the DB.
I have tried to Google this every way I can and am getting nowhere. Though in a couple of very short forum posts that I did find there seemed to be an idea that it was not practicable.
Any and all help will be gratefully received -
Sounds pretty straight-forward: create a DB table with columns for what you want to save (email address, name, subject, text, timestamp); and in the code where you have gotten all that info ready to send in an email, also use it in a database insert.
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
How to Ask Questions the Smart Way
(not affiliated with this site, but well worth reading)
Remember when choosing a DB interface for MySQL to use mysqli_ or PDO, not mysql_ which is outdated and will be removed from PHP.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread