By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,693 Members | 1,972 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,693 IT Pros & Developers. It's quick & easy.

Resend password function

P: 1
Hi there,

I am trying to create a 'resend password' function as my members get a little confused sometimes (just as I am now!)...ah the irony!

In any case, the below code gets me to my output html template, however; I also want it to send details to the member via e-mail.

The below code gives me an e-mail and information in the subject line... but I don't know how to get information from let's say a .txt template with the message I want to say. any advice?

Here's the part that actually work's: go to www.yourstocktips.com.au/forgotpass.htm and type in "Nala" as the user name (dummy account).

Thanks!

OzNewbie

Here's the code:
Expand|Select|Wrap|Line Numbers
  1. ###############################
  2. # Send password
  3. ###############################
  4. sub pm_send_password
  5. {
  6.  open (DATABASE, "<${root}$database") or print $!;
  7.  if($flocking) {flock DATABASE, 2;}
  8.  
  9.  while(($thisrow = <DATABASE>))
  10.  {
  11.     if ($thisrow =~ m/^$input{'login'}\|(.*)/)
  12.      {
  13.      &init($thisrow);
  14.     &sendemail($values{'email'}, $from, $subject_lost_password, &tempwiz_to_from);
  15.      $sent = 1;
  16.      }
  17.  }
  18.  if($flocking) {flock DATABASE, 8;}
  19.  close DATABASE; 
  20.  if(!$sent){&init_errors; &err($error_message{'login not found'});exit;}
  21.  $input{'action'} = "lost_password_sent";
  22.  &tempwiz;
  23.  exit;
  24. }
  25.  
Nov 15 '09 #1
Share this Question
Share on Google+
2 Replies


Expert Mod 100+
P: 589

numberwhun
Expert Mod 2.5K+
P: 3,503
Thanks RonB for the heads up.

So, did the answer(s) that you received in the PerlGuru forum help you solve this issue?

Regards,

Jeff
Nov 17 '09 #3

Post your reply

Sign in to post your reply or Sign up for a free account.