Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Receipt from mail server with mail()

Status
Not open for further replies.

justride

Programmer
Jan 9, 2004
251
US
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.

thanks
 
Whether they are sent? No.

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.


Want the best answers? Ask the best questions!

TANSTAAFL!!
 
is there a header to get a return email to my account when the email sent is received my their mail server?
 
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..

I hope you think my reply is related, as I do.

Olav Alexander Mjelde
Admin & Webmaster
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top