Help on emailing forgot password reset

Hello friends,


Please kindly on advice the cause of my app sends do not spam users.


I am building a web application using Php, MySQL in Dreamweaver, as seen here http://rmww.org/DBMS/index.php .


Now I have a password reset form which is supposed to allow users to reset their forgotten password, as seen here http://rmww.org/DBMS/reset_password.php . When a user fills out the form, the system searches for the e-mail address and if there is, it will assign a new password to the user and sends an automated user e-mail.


The question I have now is, when the system detects the email and assigns a new password, it is not send a message to the user. Its seems to me that there is a setting that prevents that from happening.


Can you please check and advice? Here is my code:


<? php require_once('Connections/dbconnect.php');? >

<? PHP

If (isset($_POST['resetpassword']) & & $_POST ['resetpassword'] == 'resetnow') {}

@mysql_select_db ($database_dbconnect, $dbconnect);

$query_rsEmail = "SELECT E-mail for registration by e-mail WHERE = '". "." $_POST ['frm_reset_email']. » ' « ;

$rsEmail = mysql_query ($query_rsEmail, $dbconnect) or die (mysql_error ());

$row_rsEmail = mysql_fetch_assoc ($rsEmail);

$totalRows_rsEmail = mysql_num_rows ($rsEmail);

If ($totalRows_rsEmail > 0) {}

$newpass = substr (md5 (rand () .rand (()), 0, 7);

$newpassword = md5 ($newpass);

$updateSQL = "UPDATE record SET password =" "." $newpassword. "" "WHERE email = '". " $_POST ['frm_reset_email']. » ' « ;

@mysql_select_db ($database_dbconnect, $dbconnect);

$Result = mysql_query ($updateSQL, $dbconnect) or die (mysql_error());

If ($Result) {}

$to = $_POST ['frm_reset_email'];

$subject = 'Your new password';

  $from = ' [email protected] ';

$headers = "MIME-Version: 1.0\r\n";

$headers. = "content-type: text / html;" Charset = UTF-8\r\n ";

$headers. = "from: my Web site name <". "." $from. "' > \r\n";

$headers. = "reply-to: the name of my Web site <". "." $from. "' > \r\n";

$message = ' < div style = "do-family: Arial, Verdana, Sans-serif;" Color: #333; do-size: 12px ">"

< p > you asked for the new password. < /p >

< p > your new password is: '. $newpass. "< /p > < / div > ';

If (mail ($ $subject, $message, $headers)) {}

$res = "< p > your new password was sent to your registered e-mail address. < /p > ";

} else {}

$res = ' < p > your new password has been sent. < br / > please contact the administrator. < /p > ';

}

} else {}

$res = ' < p > your new password could not be generated. < br / > please contact the administrator. < /p > ';

}

} else {}

$mess = 'this email address is not registered on our system. "

}

mysql_free_result ($rsEmail);

}

? >

< ! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional / / IN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" > ""

" < html xmlns =" http://www.w3.org/1999/xhtml ">

< head >

< meta http-equiv = "Content-Type" content = text/html"; Charset = UTF-8 "/ >"

< title > Untitled Document < /title >

< link href = "styles/core.css" rel = "stylesheet" type = "text/css" / > "

< / head >

< body >

<? PHP if (isset ($res)) {echo $res ;}? >

< form id = "frm_reset" name = "frm_reset" method = "post" action = "" >

< table border = "0" cellspacing = "0" cellpadding = "0" id = "tbl_insert" >

<? PHP if (isset ($mess)) {? >}

< b >

< th > < /th >

< td > <? PHP echo $mess;? > < table >

< /tr >

<? PHP}? >

< b >

< scope = "row" th > < address label for = "frm_reset_email" >: < / label > < /th >

< td > < input name = "frm_reset_email" type = "text" class = "frm_fld" id = "frm_reset_email" / > < table >

< /tr >

< b >

< scope = "row" th > < /th >

< td > < label >

< input type = "submit" name = "button" id = "button" value = "Reset password" / >

< / label > < table >

< /tr >

< /table >

< input type = "hidden" name = "resetpassword' value ="resetnow"/ >

< / make >

< / body >

< / html >



Thank you

Michael Nwuzor

Hi all

Thank you for taking the time to review my code possible solution.

We were able to solve the problem. The problem was not the code infacts 3 different samples of codes which have been compiled for this task. The problem came from our hosting company. They locked or disabled the feature that is supposed to allow sending code on required emails. So, even when the code handles the task of backend has completed its work, it may not send a return email to the user.

We contacted our hosting company and has informed about it and asked how they can help track the issue. That's when they told us and said (Please read their emails below)

We have implemented additional security measures against spam on our servers hosting several months ago, resulting in a change in the configuration of the mail server. In particular, it is not possible to send an email on accounts and default e-mail account does not exist more and scripts are required to use the proper SMTP authentication.

In order to solve the problem, you use SMTP as the e-mail sending method and include the SMTP authentication in your script. For authentication, you must use a valid email address created in cPanel > Email and its respective password accounts. Please make sure that your script settings meet these requirements and are trying to send mail again, it should work.

In our effort to implement the solution they suggested, they finally asked us to send our email address so that they can help us to define the system from their point of arrival indicated below

One of the ways to implement authentication SMTP in PHP is http://email.about.com/od/emailprogrammingtips/qt/PHP_Email_SMTP_Authentication.htm

Optionally, you can specify the outgoing e-mail address using the PHP "sendmail_path" parameter, if this option is more appropriate, please let us know the email address (hosted locally on the same server, created in the cPanel > e-mail accounts) and we will help.

What they have done to their end, and now our code runs as expected. Should their be a faced with these challenges, strive to communicate with your hosting company.

Hope this helps

Mike

Tags: Dreamweaver

Similar Questions

  • Microsoft email account password reset

    Hello

    I have a new PC that I bought last Nov/Dec with Windows 8 operating system.  At the point where I was getting set up I had either a Microsoft Access email or something but he bypassed that and I was able to set up local access and password which was very good.  I confirmed that I have a Microsoft email account configuration * address email is removed from the privacy *' with a password is valid, but this password does not work on my PC if I try to switch on my pc to Microsoft.

    How can I get the password reset for my Microsoft account which I suppose is using the above email address.

    Thank you for your help.

    Best regards

    Anita Kuchera (Skeat)

    Hello

    TO change the account which I guess is what you would you do just got to start Microsoft screen and go down to the right and get the charms of the side go them to change the settings of the PC then users, then change on behalf of Microsoft

    Hope this helps :)

  • Email account password reset

    Short to change a primary site contact E-mail, how can I reset password of user's email account and have the message 'forgot password' sent to an external e-mail address?

    It turns out that I had to go back to the old version available. That must be why was almost sure that I remember doing before.

  • Helps administrator (windows vista) password reset

    Is there a way to reset the administrator password in windows vista without having saved the old password on the 'reset password Assistant"? I got this computer with this software, because it was introduced, and I never had a disk backup password. My administrator password has expired in June, and it's the only restore option I give myself. Help please!

    Hello

    You need the reset disk which never did you.

    See if that helps you.

    http://www.Vistax64.com/tutorials/96092-password-expiration-Vista.html

    Microsoft prohibits any help given in these Forums for you help bypass or "crack" passwords lost or forgotten.

    Here's information from Microsoft, explaining that the policy:

    http://answers.Microsoft.com/en-us/Windows/Forum/Windows_7-security/keeping-passwords-secure-Microsoft-policy-on/39f56ef0-5d68-41AD-9daa-6e6019c25d37

    See you soon.

  • Cannot send Emails on password reset in OIM11gR1

    Hi all

    We use an OIM11gR1 in the cloud. And SMTP server of gmail as our mail servers and tries to send emails that are available OOTB.

    We have created a user with a valid email sent. And you try to reset this password to users as xelsysadm.

    We manually set a password that meets the policy of pwd setup in our system. But when you click the Reset button, we get an error message in the pop-up as 'an error occurred when changing the password of the user. " "An unknown error has occurred when sending the notification"

    Could someone please help me out here.

    Thank you

    Maryse

    Hi all

    Finally I could find the problem and fix it. SMTP Amazon server needs authentication and does not allow anonymous auth. considering that in our configuration, the resource has been created by setting authentication = false and when I set authentication = true and specify the user name & password, he launched me following the newspaper error message:

    javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: building way PKIX failed: weblogic

    javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: building way PKIX failed: sun.security.provider.certpath.SunCertPathBuilderException: could not find the path of valid certification for target asked
    at edu.sfsu.identity.boxconnector.AbstractHttpClientSocket_TokenDB.getRequest(AbstractHttpClientSocket_TokenDB.java:551)
    at edu.sfsu.identity.boxconnector.BoxConnection.getUserByEmail(BoxConnection.java:71)
    at edu.sfsu.identity.boxconnector.BoxIdentityConnector.create(BoxIdentityConnector.java:199)
    at org.identityconnectors.framework.impl.api.local.operations.CreateImpl.create(CreateImpl.java:80)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

    When I check the keystore (Java - cacerts cacerts Weblogic & DemoTrust.jks), the Amazonia SSL certificate is missing. So I imported the certificate in all these 3 keystore then restarted the WebLogic Server.

    Now the problem is solved and I could send emails successfully.

    Thank you for all your help.

    Rgds,

    Maryse

  • JOURN. E TOUCH - email and password reset for Toshiba virtualstore

    Hello

    You can reset the e-mail address and the password for toshiba virtualstore empty.

    The personal account number is 24820.

    the DAY. E TOUCH has been blocked since the first time I want to go to the toshiba vitualstore.

    Thank you
    Volker kastl

    I put t think it can be done on this path without some sort of verification.
    I recommend you to call the hotline of Toshiba and ask if this is possible and how.

  • A technical support engineer microsoft can help me get my password reset in this region?

    I did the reset password form and no one has answered it in 4 days. I just got a response from a post I put on the public forum and someone said they received nothing in 12 days. Can someone tell me whats going on. Because the Windows Live ID support team does not want answering anything whatsoever.

    Thank you

    Hello dominikkononczuk,

    There is a forum for Hot Mail or Windows Live Mail.

    Please click the link below to send your question by e-mail.
    http://windowslivehelp.com/

    We cannot reset passwords or retrieve messages in Windows answers Forum.

    Thank you

    Marilyn

  • EliteBook 820 G1: G1 Elitebook 820 BIOS password reset

    Hello

    I've been updated BIOS firmware for laptop users, but I am stuck because of the absence of BIOS admin password. This has not been defined by anyone, and if so, I already tried a few passwords by default we use in special cases like this. Can you please help me with BIOS password reset please? I don't want to open up the laptop to reset the BIOS with the PIN, battery or switch... and I'm really not sure if this is possible with this model. Whatever it is, guaranteed disappears if I do.

    Series No.: [personal information deleted]

    Concerning

    Kim Hagen

    Senior technical consultant

    CMA Contiki AS

    Norway

    Enterprise-class specifications are of a very different category than consumer laptops.

    Security is very strict.

    Remove the password admin or start will require replacement of the motherboard or BIOS CMOS chip with one that has been programmed with a new copy of a ROM family file there is place of BIOS.

    For the notebook to stay in coverage that must be performed by a service provider authorized HP.

    "I don't want to open up the laptop to reset the BIOS with the PIN, battery or switch... and I'm really not sure if this is possible with this model." The old-school methods are not possible with this generation of modern models of laptop Elitebook.

  • someone will help me please, I am a senior and I forgot my password the I have a laptop with windows 7, the Reset Wizard is telling me that I need to create a password reset disk how do

    I have an acer laptop I am a senior and I forgot my password, Reset Wizard tells me I need to create a password how to reset cd dom that

    http://support.Microsoft.com/kb/305478/en-GB

  • I'm a developer I forgot my password and password reset e-mail has not been received

    Hello
    We got a plugin developer account
    https://addons.Mozilla.org/en-us/Firefox/users/login?to=/en-us/developers/addons

    Unfortunately we forgot the password and tried to recover it via password reset, but the email to reset the password has not been delivered. Tried several times yesterday and today.
    Our account e-mail address is:
    [email protected]

    Thanks for your help.

    The support forum Addons is separated from the Mozilla product support forum. https://forums.Mozilla.org/addons/

    Try to post in the forum AMO Feedback and Support .

  • ePrint 'forgot password' send email

    I forgot my password ePrintCenter, so I clicked on "Forgot password?"  Entered my e-mail address in the pop-up and click 'OK', but nothing happens. that is, no email is sent.  I tried to enter a fake email address and then get a message "enter the email address associated with your account.  So that pop up doing something when I click 'OK '. It's just that he doesn't seem to be to send me an email for me to reset my password.  How do I reset my password so I can connect to my account ePrintCenter?

    Hi Andy,.

    Thanks for your help and information.  You've been a great help!

    See you soon,.

    Sandra

  • E-mail/password reset for an xbox 360. Windows Live support is me misleading to their moderators, etc. I need some help here!

    I need a password reset on an old e-mail account linked to my xbox 360. (the enamel of related Xbox Live account). However after going around in circles with the xbox and Windows Live support person will help me. I have provided more than enough evidence that its me (old/new address, debit card info AND xbox console ID AND serial number for information). And I am NOT to START a NEW GAMERTAG due the fact that I have spent money under my current gamertag. Now they are misleading me to the moderators of Windows with this problem. So now what?

    E-mail bellsouth.net and its related help/support page has since been purchased, reformatted and dissolved for their new name like ATnT. Their support tech/operators won't help me as well since it is a problem of bellsouth and not an ATnT. But the email is bellsouth.

    I can't do any kind of password reset because I forgot my secret question answer. A mistake in good faith, but one that keeps this issue to be resolved. I have provided a list of answers to him but still no help and I keep getting turned down and rejected.

    Windows answers forums are for technical problems and we do not have any control over the resets password for all Windows, XBOX and Windows LIve accounts.

    You will need to contact Windows Live Support as Kim said.

    http://windowslivehelp.com/product.aspx?ProductID=15

    Thank you

  • ZTE S-6000-F reset / forgot password

    Hello

    My son did not use his stand for a month ad forgot his password for the model. There is an option for you connect using email and password, but we tried all the variations of our addresses, and none of them work. I think that we have to do a factory reset, but we do not know how to do it on this model. I searched the forums and can't find anything on this subject.

    Can someone please?

    I don't think you can like passwords are there to prevent people to access the Tablet, if it got stolen etc. all I can suggest sounds Lenovo and see what they say, you may need to send to them.

  • I got 2 emails telling me that I sent a password reset for my account hotmail, when I did no such thing is a way to know who is trying to get into my email account?

    I got 2 emails telling me that I sent a password reset for my account hotmail, when I did no such thing is a way to know who is trying to get into my email account? My e-mail address is * address email is removed from the privacy *.

    Send replies it thank you

    Not really, no.  It could be an accident too - someone ' one with a user name very similar to yours that's typo in their username, may not know why they are unable to open a session, requested a password reset, thinking they forgot what it.

    -B-
    http://www.officeforlawyers.com
    Author: Guide to counsel for Microsoft Outlook

  • Help with "Password reset Wizard"

    I have vista Home premium and cannot access my administrator account because of a change in software that has sometimes happened mid-2012. I now get a pop-up, called a "password reset Wizard" which requires passwords to backup on a disk. This obligation did not exist in the past and I need to know how to solve this problem. I can't update my computer without access to the administrator account.

    Hello

    Password reset disk process has always been available to Vista.

    'Create a password reset disk'

    http://Windows.Microsoft.com/is-is/Windows-Vista/create-a-password-reset-disk

    But it had to be created BEFORE that you forgot your password.

    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

    Microsoft prohibits any help given in these Forums for you help bypass or "crack" passwords lost or forgotten.

    Here's information from Microsoft, explaining that the policy:

    http://answers.Microsoft.com/en-us/Windows/Forum/Windows_7-security/keeping-passwords-secure-Microsoft-policy-on/39f56ef0-5d68-41AD-9daa-6e6019c25d37

    And this is the Information from Microsoft on the problems of passwords;

    You will need to borrow a Microsoft DVD from a friend, Recovery DVD a manufacturer without these special work options available.

    If you are unable to connect to Windows 7 or Windows Vista, you can use the Windows Vista System Restore feature, or the Windows 7 system restore feature.

    You may be unable to connect to Windows Vista or Windows 7 in the following scenarios:

    • Scenario 1: You recently set a new password for the protected administrator account. However, you don't remember the password.
    • Scenario 2: You type the correct password. However, Windows Vista or Windows 7 does not accept the password because the system is damaged.
    • Scenario 3: You delete a protected administrator account. Now, you cannot connect to another administrator account.
    • Scenario 4: You change an administrator account protected with a standard user account. Now, you cannot connect to another administrator account.

    See you soon.

Maybe you are looking for

  • Cannot download the security updates in windows xp

    Windows XP issue - I have several times notice that security updates are available, but after going through the movements SEVERAL times, always the message automatic updates that "some updates could not be installed".  All seem to be updated for secu

  • Problems with the installation.

    My computer does not seem to want to read the installation disc. I think that its screwed upward. How do I install without the disc, is it possible? Sorry if this question has already been asked to answer. IM new webcams and the use of this site as w

  • How to create Secureboot DELL PE disk with NTFS partition

    Hi Tyler I tried with /secureboot command line switch, but its not allow me to change partition to NTFS format. Answer me as soon as possible Thank you Deepak

  • Is it possible to fix a corrupted by default profile

    After you fix a corrupted profile, I noticed that most of my programs to "all programs" was missing, but they still exist in program files/program (x 86).  I decided to save my information and the profile to remove completely.  I let the system to cr

  • Why my cable network keep disappearing?

    My network keeps disappearing. It works very well for several days, then suddenly it disconnects. The network itself works fine and accessible with the help of other computers. The router is OK and works correctly. On the Windows 7 computer, however,