OzNewbie has asked for the wisdom of the Perl Monks concerning the following question:
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:
############################### # 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, &tempw +iz_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; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: trying to create a resend password function
by ikegami (Patriarch) on Nov 15, 2009 at 05:15 UTC | |
|
Re: trying to create a resend password function
by merlyn (Sage) on Nov 15, 2009 at 04:32 UTC | |
| |
|
Re: trying to create a resend password function
by Your Mother (Archbishop) on Nov 18, 2009 at 19:50 UTC | |
|
Re: trying to create a resend password function
by Sinistral (Monsignor) on Nov 18, 2009 at 18:42 UTC | |
|
Re: trying to create a resend password function
by Anonymous Monk on Nov 15, 2009 at 14:15 UTC | |
by apl (Monsignor) on Nov 15, 2009 at 19:55 UTC |