close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

forgotten password not sending email

Thread began 10/16/2011 3:47 am by info97301 | Last modified 10/20/2011 2:44 pm by info97301 | 3001 views | 8 replies |

info97301

forgotten password not sending email

Hi

I've run the wizard to create login/registration/reminder pages; the first two run successfully.

However, the forgottenpassword.php does not send any email; if you enter a non-existent address, the 'not found' message appears, so it is communicating with the database. However, enter a correct address and the page just goes blank and nothing else happens. The URL doesn't change to the login page and no email is sent.

I've tried the various things gleaned elsewhwere iin the forums and have tied ticking and unticking the 'additional header' box, all to no avail.

Emails sent from other pages on the site wok fine, so I don't think it's a server issue.

Any help much appreciated

Cheers

Chris

Sign in to reply to this post

Jason ByrnesWebAssist

if it is showing a blank page, it means a php error has occurred, but error reporting is not enabled.

add the following code at line 1 of the page to turn error reporting on:

php:
<?php 

error_reporting
(E_ALL);
ini_set('display_errors','on');
?>
Sign in to reply to this post

info97301

Hi Jason

Thanks - sorry for the delay, I thought I'd already replied!

Error:

Warning: Missing argument 6 for wa_securityassist_definition() in C:\Home\r\o\rotuki\www\webassist\security_assist\mail_php.php on line 34

Fatal error: Call to undefined function: session_commit() in C:\Home\r\o\rotuki\www\webassist\security_assist\mail_php.php on line 238

Cheers

Chris

Sign in to reply to this post

Jason ByrnesWebAssist

send a copy of your forgot password page please, also, what version of php is the server running? it looks lie it is an older php version, you should see if the host will upgrade your server to php 5.3

Sign in to reply to this post

info97301

Thanks Jason

It's v4.?? at the moment - we will be upgrading shortly.

Following code:

<?php
error_reporting(E_ALL);
ini_set('display_errors','on');
?>
<?php require_once('Connections/connRIBIT.php');?>
<?php require_once("webassist/form_validations/wavt_scripts_php.php"); ?>
<?php require_once("webassist/form_validations/wavt_validatedform_php.php"); ?>
<?php require_once( "webassist/security_assist/helper_php.php" ); ?>
<?php
if (isset($_POST["ForgotPassword_submit"])) {
$WAFV_Redirect = "".(htmlentities($_SERVER["PHP_SELF"], ENT_QUOTES)) ."?invalid=true";
$_SESSION['WAVT_forgotpassword_Errors'] = "";
if ($WAFV_Redirect == "") {
$WAFV_Redirect = $_SERVER["PHP_SELF"];
}
$WAFV_Errors = "";
$WAFV_Errors .= WAValidateEM((isset($_POST["Forgot_Password_group_MemEmail"])?$_POST["Forgot_Password_group_MemEmail"]:"") . "",false,1);

if ($WAFV_Errors != "") {
PostResult($WAFV_Redirect,$WAFV_Errors,"forgotpassword");
}
}
?>
<?php
function WA_SecurityAssist_Email_1_SendMail($WA_Auth_Parameter){
$WA_MailObject = WA_SecurityAssist_Definition("smtp.domain.org","25","","","");
$WA_MailObject = WA_SecurityAssist_SendMail($WA_MailObject,"","","",$WA_Auth_Parameter["toAddress"],"",$WA_Auth_Parameter["fromAddress"],$WA_Auth_Parameter["subject"],$WA_Auth_Parameter["mailBody"]);
$WA_MailObject = null;
}// WA_SecurityAssist_Email_1_SendMail
?>
<?php
if(isset($_POST["ForgotPassword_submit"])){
//WA SecurityAssist Email object="mail"
$WA_Auth_Parameter = array(
"connection" => $connRIBIT,
"database" => $database_connRIBIT,
"tableName" => "rotarians",
"filterColumn" => "MemEmail",
"filterEncryption" => "",
"columnValue" => "".((isset($_POST["Forgot_Password_group_MemEmail"]))?$_POST["Forgot_Password_group_MemEmail"]:"") ."",
"columnType" => "text",
"usernameColumn" => "MemUserName",
"usernameEncryption" => "",
"passwordColumn" => "MemPwd",
"passwordEncryption" => "",
"selectColumns" => array("MemUserName","MemPwd","MemEmail"),
"sessionVariables" => array(""),
"successRedirect" => "clublogin.php?emailedPassword=1",
"failRedirect" => "forgotpassword.php?notFound=1",
"keepQueryString" => TRUE,
"toAddressColumn" => "MemEmail",
"toAddressEncryption" => "",
"fromAddress" => "sysadmin@domain.org",
"fromAddressDisplay" => "",
"subject" => "forgotten login details",
"mailBody" => "webassist/security_assist/email/forgotpassword_email.php",
"emailFunction" => "WA_SecurityAssist_Email_1_SendMail"
);

WA_Auth_ForgotPassword($WA_Auth_Parameter);
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Forgotten login details</title>
<script src="webassist/progress_bar/jquery-blockui-formprocessing.js" type="text/javascript"></script>
<link href="SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css">
<script src="SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
<script src="webassist/forms/wa_servervalidation.js" type="text/javascript"></script>
<link href="webassist/forms/fd_basic_default.css" rel="stylesheet" type="text/css">
</head>

<body>

<?php if(WA_Auth_RulePasses("Validated form")){ // Begin Show Region ?>
<p>Invalid information, please check your entries and try again</p>
<?php } // End Show Region ?>


<?php if(WA_Auth_RulePasses("Email address not found")){ // Begin Show Region ?>
<p>Your email address could not be found in our records. Please try again.</p>
<?php } // End Show Region ?>


<div id="ForgotPWContainer" class="WAATK">
<div id="ForgotPassword_Basic_Default_ProgressWrapper">
<form class="Basic_Default" id="ForgotPassword_Basic_Default" name="ForgotPassword_Basic_Default" method="post" action="<?php echo (htmlentities($_SERVER["PHP_SELF"], ENT_QUOTES)); ?>">
<!--
WebAssist CSS Form Builder - Form v1
CC: Forgot Password
CP: Default
TC: Basic
TP: Default
-->
<fieldset class="Basic_Default" id="Forgot_Password">
<legend class="groupHeader">Forgotten login details</legend>
<span class="fieldsetDescription"> Required * </span>
<div class="lineGroup">
<label for="Forgot_Password_group_MemEmail" class="sublabel" > Your Email address:</label>
<div class="errorGroup"> <span id="Forgot_Password_group_MemEmail_Spry">
<input id="Forgot_Password_group_MemEmail" name="Forgot_Password_group_MemEmail" type="text" value="<?php echo((isset($_GET["invalid"])?ValidatedField("forgotpassword","Forgot_Password_group_MemEmail"):"")); ?>" class="formTextfield_Medium" tabindex="1" onBlur="hideServerError('Forgot_Password_group_MemEmail_ServerError');">
<?php
if (ValidatedField('forgotpassword','forgotpassword')) {
if ((strpos((",".ValidatedField("forgotpassword","forgotpassword").","), "," . "1" . ",") !== false || "1" == "")) {
if (!(false)) {
?>
<span class="serverInvalidState" id="Forgot_Password_group_MemEmail_ServerError">Please enter a value.</span>
<?php //WAFV_Conditional forgotpassword.php forgotpassword(1:)
}
}
}?>
<span class="textfieldInvalidFormatMsg">Invalid format.</span><span class="textfieldRequiredMsg">Please enter a value.</span> </span> </div>
</div>
<span class="buttonFieldGroup" >
<input class="formButton" name="ForgotPassword_submit" type="submit" id="ForgotPassword_submit" value="Send" onClick="clearAllServerErrors('ForgotPassword_Basic_Default')" tabindex="1">
</span>
</fieldset>
</form>
</div>
<div id="ForgotPassword_Basic_Default_ProgressMessageWrapper" class="blockUIOverlay" style="display:none;">
<script type="text/javascript">
WADFP_SetProgressToForm('ForgotPassword_Basic_Default', 'ForgotPassword_Basic_Default_ProgressMessageWrapper', WADFP_Theme_Options['BigSpin:Slate']);
</script>
<div id="ForgotPassword_Basic_Default_ProgressMessage" >
<p style="margin:10px; padding:5px;" ><img src="webassist/progress_bar/images/slate-largespin.gif" alt="" title="" style="vertical-align:middle;" />&nbsp;&nbsp;Please wait</p>
</div>
</div>
</div>
<script type="text/javascript">
<!--
var Forgot_Password_group_MemEmail_Spry = new Spry.Widget.ValidationTextField("Forgot_Password_group_MemEmail_Spry", "email", { isRequired:false , validateOn:["blur"]});
//-->
</script>
</body>
</html>


Cheers

Chris

Sign in to reply to this post

Jason ByrnesWebAssist

change this line:

php:
$WA_MailObject = WA_SecurityAssist_Definition("smtp.domain.org","25 ","","","");




to:

php:
$WA_MailObject = WA_SecurityAssist_Definition("smtp.domain.org","25 ","","","","");
Sign in to reply to this post

info97301

Hi Jason

that gets rid of the first error!

i now get:

Fatal error: Call to undefined function: session_commit() in C:\Home\r\o\rotuki\www\webassist\security_assist\mail_php.php on line 238
-----------------------

mail_php.php code attached

Thanks

Chris

Attached Files
mail_php.php.txt
Sign in to reply to this post

Jason ByrnesWebAssist

that error was why i suggested updating the php server.

it should be fixed on updating the php server to 5.3

Sign in to reply to this post

info97301

OK Jason - thanks for your time.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...