how to make an account activation by email

I'm glad to be in this forum. I'm making a system to connect three applications in one and have a user register page.

The register page sends an email to the user asking activate the account in order to use the system.

I'm having some matters.
First: I encrypt the username and password with base64_encode and decrypt with base64_decode to send it to the email. * when I update the page the username gets its encode chars and change. I can see that on the confirmation page. *

Second: after sending the confirmation email to the user, I destroy the cookies i use to go though the registration process and when user clicks in email confirmation link, i activate the cookies again. But there's an error:
The email is sent but the content of the email no.

I use this code:
$email= $_COOKIE["email"];

$pwd= $_COOKIE['password'];
$user= $_COOKIE['usuario'];

if(isset($_COOKIE['usuario'])){

echo 'Bievenido a la seccion'." --". $user . "<br>";

$secret= 'proyectos'; //Change this to something long and complicated
$username = base64_encode($user);
$password2 = base64_encode($pwd); //Clean this variable first!

$hash = sha1($username.$secret);

$Text = "To Confirm, click here: <a href= 'htttp: mydomain/pruebacookies2/confirmacion.php?username=$username&password=$password2&hash=$hash'>Confirmar usuario</a>";

/* echo $Text; */

}
else{
echo 'Error: Ha accedido a una sección restringida. Vueva a intentarlo';}

and this is the email part:
$headers = "From: Mydomain.com\r\n";
$headers .= "cc: $from\r\n";
//$headers .= "Bcc: sample3.domainname.com\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers = "MIME-Version: 1.0rn";
$headers = "From: $from\r\n";
$headers .= "Content-type: text/html\r\n";

$enviarmail= mail($to, $subject, $message, $headers);

if ($enviarmail)
{
$enviado= true;
}
else{ $enviado= false;
}
Can you help me or telling me where to find an activation by email script?

I don't really know what is wrong...
I need some help, if i don't fix this, my job is hot!

Smilar Topics

  • Account Activation Email Question

    I'm sending an email when a user registers, but the content is not showing up in the email body. There's an attachment that comes, so just wondering what the heck I'm doing wrong here.$to = "$email";$from = "admin@sodidwe.com";$subject = "so.did.we registration link";$m ...

  • How to create an email account in email client like outlook programatically?

    Any body know that how can i create an email account in email client like outlook and eudora programatically??If u find some way than pls tell me. ...

  • Can't Activation Email to Send?...Strange?

    Here is a script I have setup for user registration on a website of mine. I can't get the activation e-mail to send to the user. It worked the very first time I signed up with an email account under the sites same domain (ie me@thesite.com) But ever since I won't send out the activation email. I can ...

  • account activation

    how can i do account activation same as what happen her in this site ,any thing will be helpful ...

  • Weird activation email messup

    Here is the current page, The email activation will start at line 60 of the below php. i want to be able to rename the email and have the html email fixed. but when i try, a parse error shows up. when i receive the email it looks like thisEmail from: "Content-type: text/html@foxham.site5.com; ...

  • Best practice for Account Activation functionality?

    I was wondering whether there's any established 'best practice' when it comes to creating Account Activation functionality for a website or forum.To clarify my question:I'm currently developing a web forum that requires newly signed-up users to activate their new accounts by means of an emailed hype ...

  • How to get an email GUID with PHP

    I am trying to incorporate into my existing PHP script to retrieve the "GUID" (as it is called by MS - Globally unique identifier) for email messages downloaded with the php imap functions.According to what I understand (and have read) the GUID of the message does not change wherever it is ...

  • jQuery How make a effect like windows phone 7

    Hi..anybody know how make a cute transition like the wp7..like the second 1:31 from http://www.youtube.com/watch?v=P5VQPtfOsgc...It's a very nice effect but I think is very difficult get.. ...

  • how do i turn email notifications off on this forum?

    how do i turn email notifications off on this forum? ...

  • How make visible ListCtrl ?

    I have one ListCtrl ( really, class derived from ListCtrl) f.e name it " One".this One isa copy of other class derived from ListCtrl ( f.e. Two)One = ( Class _One_Definition *) Two.just now I have a great problem, how show control One!it is populated with valid data from Two, I checked it, ...

  • How make a good paging

    Anybody know how make a good paging in db2?Usually i retrieve all data from db2 and got the resultset object within a conditional from query like :sql = "SELECT * from MSEmployee where Name like '%" + condition + "'%"I always take 10 record for one page.after that i got ResutlSet ...

  • How to stop receiving email from phpbuil

    How to stop receiving email from phpbuilder ?I can't find it where should i change.bcoz right now i got all forum repply in my mailbox ...

  • How to create an email attachment

    How to create an email attachment that will be incorporated into a send form mail system? ...

  • Oracle How do I change email address?

    I can login using the username and email address, How do I change email address? ...

  • Oracle Not Received Sun Microsystems Certification Account Activation mail yet

    I have taken Sun certified java programmer for edition 5 on 28th jan 2011 its been already 2 days since then but i have not received a mail from Sun Microsystems Certification Account Activation only what i have it the printed exam report from the Exam center. But all my friends who have taken the e ...

  • pl help...How to track how mamy read an email

    Would someone plesase let me know how to track how many opened an email i sent them? (Conducting a survey and need to track how many at least opened it)Thanks & best ...

  • how do i auto email users

    I have a database named blah.In blah I have a table named ninjas.In ninjas are height, weight, number of victims, emailIf new ninja1 registers and enters height, number of victims, and email but doesn't know his weight how would I automatically email him every 15 days until he enters the missing inf ...

  • How to delay sending email in php

    Can anybody pls tell how to delay sending email in php ...

  • Account Activation Key problem

    I use the following code (taken from a thread on this board) to generate an account activation key.function key_create() {$letters = " ABCDEFGHIJKLMOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890";$len=strlen($letters);$num="12";for ($i=0; $i < $num; $i++){$_rand=rand(0,$len) ...

  • How to get contact email from MSN Messenger or windows messenger?

    How to get contact email from MSN Messenger or windows messenger in my MFC program? ...

  • Ubuntu how make *.deb

    how make new package *.deb from source code to make install from apt ...

  • How i can send email from java application using Imap standard ?

    Hithank you for reading my posthow i can send email from java application using IMAP standard ?I tried the sample that sun provided with its javamail package but i can not understand it.i want a sample that show me how to send email [b]using IMAP protocol[/b]if any one can help me i will be very tha ...

  • How do I send email from command prompt?

    How do I send email from command prompt?i tried thisCode: ...

  • How to validate the Email in jsf2.0

    I am developing web application using jsf2.0.In this case, I wish to validate the email field with the help of import org.hibernate.validator.Email;But it is not working, How to validate the email fileld... ...

  • Have the Idea but how make works??

    It's just the Idea , i really don't figure out how do this .Then like all people say , find a Guru =) , here i think that exist alot of then =).Very well .Let say that i have a page , the user need login in this page with (Login/Pass) and have it store into a Mysql DB.Simple Ok.Then the registered u ...

  • Ubuntu How to set up email server & think client server

    How to set up email server & think client server using Ubuntu Os? ...

  • need help how to add multiple email addresses on a radio button

    I need some help how to include multiple email addresses in a radio button. This radio button will hold at least 2 email addresses within an organization. After user clicks the Submit button in a form. The email addresses will go directly on the To: of the Inbox.I am not sure how to go about this pr ...

  • how to generate and email the page link to email id which is stored in database

    how to generate and email the page link to email id which is stored in database? Please help me . I have idea just about the http handler but how to use it i don't know! please help!regards mangesh5588 ...

  • How to validate the Email in jsf2.0

    I am developing web application using jsf2.0.In this case, I wish to validate the email field with the help of import org.hibernate.validator.Email;But it is not working, How to validate the email fileld... ...

  • Oracle How make LOV in JDeveloper 10g by ADF

    How make LOV in JDeveloper 10g by ADFplease help guys ? ...