+ 2
Confirm email/link
I want to create a confirmation link. User registrates on website and receives an email. The email should contain a link, to verify the users email address. How do I create this link? What should it contain? Expireation time? Some kind of token? Is it like: user clicks on link -> sends an email to me? Thanks in advance!
2 Antworten
+ 1
$email=the reciever ;
$from=the sender ;
$subject= confirm ur email;
$message= "<html>
<a href=ur page > verify email </a>
</html>";
$headers ="from :".$from;
Mail($email,$subject,$message,$headers);
It should be something like that not sure , good luck
0
Thanks for your answer. I use django to create my app. I managed to get the users email address and to send mails.
When I put html code in the email (I didn't try that yet), that the user receives I can put href leading to my website.
My aim is, to receive an email, that tells me that the user confirmed his email and update my user-database. I was thinking about an id number and a input field on the linked website. I think that would probably work, but the user would have to enter the code and click a button again.
It would be better, if the user just had to click on the link and the rest happens automaticly.
So I would have to pass a parameter (user id) with the link and run a function, when the user clicks on the link.(?)