Resend password function

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • OzNewbie
    New Member
    • Nov 2009
    • 1

    Resend password function

    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:
    Code:
    ###############################
    # Send password
    ###############################
    sub pm_send_password
    {
     open (DATABASE, "<${root}$database") or print $!;
     if($flocking) {flock DATABASE, 2;}
    
     while(($thisrow = <DATABASE>))
     {
        if ($thisrow =~ m/^$input{'login'}\|(.*)/)
     	{
         &init($thisrow);
    	&sendemail($values{'email'}, $from, $subject_lost_password, &tempwiz_to_from);
    	 $sent = 1;
     	}
     }
     if($flocking) {flock DATABASE, 8;}
     close DATABASE; 
     if(!$sent){&init_errors; &err($error_message{'login not found'});exit;}
     $input{'action'} = "lost_password_sent";
     &tempwiz;
     exit;
    }
    Last edited by numberwhun; Nov 17 '09, 01:53 AM. Reason: Please use code tags!
  • RonB
    Recognized Expert Contributor
    • Jun 2009
    • 589

    #2
    Cross posted: http://perlguru.com/gforum.cgi?post=...=unread#unread

    Comment

    • numberwhun
      Recognized Expert Moderator Specialist
      • May 2007
      • 3467

      #3
      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

      Comment

      Working...