i\'m new in php. I want to send an email to someone and afterwards i need to check if this mail could be received. How do i do that? Hope you guys understand my problem ;).
One option is a Web Bug but these are far from 100% reliable, and are arguably not a nice way to behave. It won't differentiate between emails which are unread and those which are undelivered, for example because of a bad email address, and it is possible to read an email containing a Web Bug without triggering it.
In short you create an HTML email containing an element which has a URL on your site which is unique to that email. So if a client accesses that URL you can be sure that someone has read your email. Wikipedia gives this example:
For example, an e-mail sent to the address
somebody@example.orgcan contain the embedded image of URLhttp://example.com/bug.gif?somebody@example.org. Whenever the user reads the e-mail, the image at this URL is requested. The part of the URL after the question mark is ignored by the server for the purpose of determining which file to send, but the complete URL is stored in the server's log file. As a result, the file bug.gif is sent and shown in the e-mail reader; at the same time, the server stores the fact that the particular e-mail sent tosomebody@example.orghas been read.
However, it is possible - probably quite likely - that someone can read your email without connecting to that URL. This may because:
This is a often used option - both by spammers and more responsible marketers - but I probably wouldn't recommend it unless you fully understand its limitations and implications in terms of what people might think of you if you do use it.