LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Help. How to do the email verfication in a website project? (https://www.linuxquestions.org/questions/programming-9/help-how-to-do-the-email-verfication-in-a-website-project-413055/)

jfernandez 02-08-2006 11:55 AM

Help. How to do the email verfication in a website project?
 
Hi,

I'm writing a website project at home in PHP. I'm using Apache web server running on Linux and access it through my windows 2000 through LAN.

I'd like to have the feature that when a new user registers, he/she gets an email in his/her email account with a link, where he/she can click and verify that the email he/she provides is real email address.

I don't know how to implement that? Do I need a mail server on my Linux? Can someone with more experience give me some hints or point me to some material where I can read? I would be very appreciated. thanks.


Joaquin

Mara 02-08-2006 04:21 PM

Moved: This thread is more suitable in Programming and has been moved accordingly to help your thread/question get the exposure it deserves.

You need to use mail() PHP function. To make it work correctly you need a SMTP server (sendmail, qmail etc). It doesn't have to be installed on the machine with your WWW server, you just need access to one.

The part with link is an easy one. A quick solution would be to generate a random number for each new user, place it in the database (along with a timeout) and send to the user. The value should be a parameter in a request to the WWW server. When the parameter matches the value in database, you have the right user.


All times are GMT -5. The time now is 01:24 PM.