Any idea if there is a header I can use to retrieve a receipt from the mail server if a email is successfully sent? I am sending a list with the mail() and I would liek to see if the emails are getting sent.
The best you can get is knowing that the server accepted them. The only way to know whether an email could not be returned is to be looking for an undeliverable message in a mailbox somewhere.
There is no way to see this, with the function mail()
If you do:
Code:
if (mail(...)) {
// foo
}
else {
// bar
}
that will only check if it gets moved to the "outbox" on the server. It will not check if they mail truly gets recieved.
For checking such things, you might want to have some kind of "activation link", and a db table with activation id's.
I made a script for "activation links" (for downloads), so my father can see who downloads what on his webpage..
eg. when they request download, they get a download link in theire email-inbox.
that link will only work once, as when it's used, the field d_active gets updated to 0 and is no longer active.
they can also only request one download per file, at a time.
however, after downloaded, they can request another download link for the same file.
very simple, but yet very effective.
I also use sessions, so they dont have to add all theire data several times, if they wish to request several files.
I present the same form to them, so they can add comments to each file they wish to download, eg. "please contact me" or anything they wish to add/edit/change.
I also use a system "input text as seen on the picture", which is an improved version of the code I gave out on this forum a loooong time ago. This system is meerly for preventing bots submitting the forms..
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.