Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    Oct 2006
    Location
    Merseyside
    Posts
    2,335
    Tokens
    0

    Latest Awards:

    Default Password script.

    I have this script which sends forgotten password to your email. But it sends it from "[email protected]". How can I change it so that it sends from the email I want it to?

    PHP Code:
    <?PHP
    ob_start
    ();
    include(
    'configuration.php');
    /*
    Forgot Password script
    */
    if ($_POST['Submit']) 
    {
    $Username htmlspecialchars($_POST['username']); 
    if (empty(
    $Username)) 
    {
    die(
    "No username was given!");
    }
      
    $Search_Query "SELECT `email` FROM `sexy` WHERE `username` = '$Username'";
      
    $Search_User  mysql_query($Search_Query) or die(mysql_error()); 

      if (
    mysql_num_rows($Search_User) == 0
      {
      die(
    "Invalid username");
      }
      
    $DB_Results   mysql_fetch_array($Search_User); 
      
    $Email        $DB_Results['email'];
      
      
    $New_Password str_shuffle('D4gh7g55CdoP');
      
    usleep(600000);
      
    //Replace "$Email" with your email address. Explanation: mail("RECEIVER EMAIL", "MESSAGE", "YOUR EMAIL")
      
    mail(me@me.com'Password Recovery''My Message.

    Your new password is '
    .$New_Password'''[email protected]');
      
    $New_Password md5($New_Password); 
      
    $Update_Password_Query "UPDATE `sexy` SET `password` = '$New_Password' WHERE `email` = '$Email'"
      
    $Update_Password       mysql_query($Update_Password_Query) or die(mysql_error());
      die(
    "Password Send"); 
    } else {
    ?>

  2. #2
    Join Date
    Oct 2006
    Posts
    2,918
    Tokens
    946
    Habbo
    Verrou

    Latest Awards:

    Default

    What do i need to do with MySQL?
    Quote Originally Posted by Special-1k View Post
    How do you uninstall an internet? I want to uninstall my Google Chrome and
    get firefox but I never really got rid of an internet my dad usually did it for me.
    If you know how post below so I can do this.

  3. #3
    Join Date
    May 2005
    Location
    /etc/passwd
    Posts
    19,110
    Tokens
    1,139

    Latest Awards:

    Default

    Post configuration.php please.
    Quote Originally Posted by Chippiewill View Post
    e-rebel forum moderator
    :8

  4. #4
    Join Date
    Jul 2006
    Location
    Athens
    Posts
    842
    Tokens
    0

    Default

    PHP Code:
    $from "myemailaddress.this.com";


    mail("[email protected]""Password Recovery""My Message.

    Your new password is '.
    $New_Password. '""$from"); 
    Your sending the from bit as an additional header.


  5. #5
    Join Date
    Oct 2006
    Location
    Merseyside
    Posts
    2,335
    Tokens
    0

    Latest Awards:

    Default

    Hmm I changed it now its not sending the email but I get no error O.o?

  6. #6
    Join Date
    Dec 2006
    Posts
    521
    Tokens
    0

    Default

    PHP Code:

    mail
    (me@me.com'Password Recovery''My Message.

    Your new password is '
    .$New_Password'''[email protected]'); 
    To:

    PHP Code:

    $headers 
    "From: Me <[email protected]>\n";
    $headers .= "Reply-To: me <[email protected]>\n";
    $headers .= "MIME-Version: 1.0\n";
    $headers .= "Content-Type: multipart/alternative; boundary=\"$mime_boundary\"\n";

    mail('[email protected]''Password Recovery''My Message.

    Your new password is '
    .$New_Password''$headers); 
    From: http://www.php.net/mail

  7. #7
    Join Date
    Jul 2006
    Location
    Athens
    Posts
    842
    Tokens
    0

    Default

    PHP Code:
    $from "From: myemailaddress.this.com\r\n";


    mail("[email protected]""Password Recovery""My Message.

    Your new password is '.
    $New_Password. '""$from"); 
    Try that


  8. #8
    Join Date
    Oct 2006
    Location
    Merseyside
    Posts
    2,335
    Tokens
    0

    Latest Awards:

    Default

    Nope =[

  9. #9
    Join Date
    Dec 2006
    Posts
    521
    Tokens
    0

    Default

    Quote Originally Posted by !Lily View Post
    Nope =[
    What is the matter:

    Is it not working?

    Or do you want to change something

  10. #10
    Join Date
    Oct 2006
    Location
    Merseyside
    Posts
    2,335
    Tokens
    0

    Latest Awards:

    Default

    I get no errors but it doesnt send the email with new password.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •