Gossamer Forum
Home : Products : Links 2.0 : Customization :

E-mail lost Password?

Quote Reply
E-mail lost Password?
I installed password modify for tempaltes, and also password e-mailer from hostglobal.com. I have a problem for not e-mailing. I know its just mail program thing I think.
I am using Interland.

What do I set up here?
This is what I currently have,
#Your mail program
$MAIL_PROGRAM='c:/winnt/system32/blat.exe';

And when I enter e-mail address, which is on database, I will get download window. If I dl it I get password.cgi file with this info.

********
syntax:
Blat <filename> -t <recipient> [optional switches (see below)]
Blat -install <server addr> <sender's addr> [-q]
Blat -h [-q]

-install <server addr> <sender's addr>: set's default SMTP server and sender

<filename> : file with the message body ('-' for console input, end with ^Z)
-t <recipient>: recipient list (comma separated)
-s <subj> : subject line
-f <sender> : overrides the default sender address (must be known to server)
-i <addr> : a 'From:' address, not necessarily known to the SMTP server.
-c <recipient>: carbon copy recipient list (comma separated)
-b <recipient>: blind carbon copy recipient list (comma separated)
-h : displays this help.
-mime : MIME Quoted-Printable Content-Transfer-Encoding.
-q : supresses *all* output.
-server <addr>: overrides the default SMTP server to be used.

Note that if the '-i' option is used, <sender> is included in 'Reply-to:'
Content-type: text/html

<html><head><title>Host Global Directory</title><meta name="GENERATOR" content="Microsoft FrontPage 3.0"></head><body link="#005C9D" bgcolor="#FFFFFF" topmargin="0" leftmargin="0"><div align="center"><center>Enter your HTML here.

</center></div><br><br>
<div align=center><center><table width="670">
<tr>
<td><center>Your password has been mailed to you.<br>
Press the back button to return from where you came.</center><br><br></td>
</FONT>

</table></center></div>
<center>Enter your HTML here for your footer.</center>
<center>Script created by Hostglobal.com - Web Hosting and Resource Directory</center>
</body></html>
******

I am able to use links 2 ok but I just set my
$db_smtp_server = '208.244.3.11';
This works, when I tried to put that number on password.cgi it looked like it worked, but it never sent any e-mail?

Hank
Quote Reply
Re: E-mail lost Password? In reply to
If you have smtp server filled in you can't have sendmail, only one or the other or they won't work.
Quote Reply
Re: E-mail lost Password? In reply to
So is this correct format then for password.cgi?$MAIL_PROGRAM='c:/winnt/system32/blat.exe';
or
$MAIL_PROGRAM='208.244.3.11'';

Bottom one looks like its working, but it dont send me any mail?

Top one just asks me to download a file?

Quote Reply
Re: E-mail lost Password? In reply to
i don't know about the bottom one because it has the same scalar as the top one $Mail_Program, so that means it would open them the same way. Have you tried any other sendmail programs.
Quote Reply
Re: E-mail lost Password? In reply to
I dont quite understand same scalar?

And why should I try some others?
Links e-mail works great?

I have another script that uses the number, not the location.....splat.exe?
this is part of that password.cgi

maybe this will help.

#**************************************
#=Edit these to your appropriate paths

#Your mail program
$MAIL_PROGRAM='c:/winnt/system32/blat.exe';

# Your admin email address. Do not delete the \ (backslash).
$admin="admin\@modernmenus.com";

# Varible passed from the form
$email=$in{'sendto'};

# Message displayed if a matching email address in not found
$notfound="Your email address does not match any in our Resource Database.\n
Please make sure your email address is correct.";
#====================================

&process_form;
}


#=======================================================================================
# Subroutines

#===================
sub process_form {

my ($found);

# Make sure we have an email address to send the info to
!$email and &site_html_add_failure ("Did not specify an email address") and return;

# Let's check to make sure the link we want to send info from is in the database.
open (DB, "<$db_file_name") or &cgierr("Error in validate_records. Unable to open $db_file_name. Reason: $!");
$found = 0;
LINE: while (<DB> ) {
(/^#/) and next LINE;
(/^\s*$/) and next LINE;
chomp;
@data = &split_decode($_);
# Check for matching Contact Email address. If it matches, get the record & stop searching.
#*****************************************************************************************
# Make sure that $db_contact_email in links.def points to the Contact Email field
#***************************************************************************************
if ($data[$db_contact_email] eq $email) {
push @match,$_;
$found = 1;
last LINE;
} # end of if
} # end of while
close DB;

# If no matching record found, display error message to user
if (!$found) {
&print_header;
print "<br><br><center>$notfound</center><br><br>\n";
&print_footer;
exit;
} # end of if

open (MAIL_RECIP, "|$MAIL_PROGRAM");

print MAIL_RECIP "To: $email\n";
print MAIL_RECIP "From: $admin\n";
print MAIL_RECIP "Subject: Password Request\n";

print MAIL_RECIP "You have requested your password for $email.\n";

Quote Reply
Re: E-mail lost Password? In reply to
doesn't blat use a different open mail type of thing?

nt people? is this true? Smile

i beleive links has like a mod for blat people..

jerrry
Quote Reply
Re: E-mail lost Password? In reply to
Well it kind of works now (Password e-mailer) with:
$MAIL_PROGRAM='c:/winnt/system32/blat.exe -t';

you see, when I put -t end of it, it says it sent me mail, but still no e-mail????Hmmm

Any idea?

Thanks

Hank


Quote Reply
Re: E-mail lost Password? In reply to
Couple of questions?

What is the order for in links.def fiole for?
Shouldnt I be able to put these in numerical order?

# Field Number of some important fields. The number is from %db_def above
# where the first field equals 0.

$db_title = 1;
$db_url = 2;
$db_modified = 3;
$db_category = 4;
$db_keywords = 5;
$db_description = 6;
$db_detaildescription =7;
And so on...

rather than original, which list them in wierd order?

Another question related to this.

when password.cgi says:

# Edit this to match your links.db fields according to link.def
($ID, $Title, $URL, $Date, $Category, $Keywords, $Description, $DetailDescription,...and so on.

Do I put the names that are included in

# Definition of your database file.
%db_def = (
ID => [0, 'numer', 5, 8, 1, '', ''],
Title => [1, 'alpha', 40, 75, 1, '', ''],
URL => [2, 'alpha', 40, 75, 1, 'http://', '^http|news|mailto|ftp'],
Date => [3, 'date', 15, 15, 1, \&get_date, ''],
Category => [4, 'alpha', 100, 150, 1, '', ''],
Keywords => [5, 'alpha', 100, 150, 1, '', ''],
Description => [6, 'alpha', '75x3', 255, 0, '', ''],
DetailDescription=> [7, 'alpha', '75x3', 2000, 0, '', ''],
'Contact Name' => [8, 'alpha', 40, 75, 1, '', ''],
'Contact Email' => [9, 'alpha', 40, 75, 1, '', '.+@.+\..+'],
and so on.

or the ones I define important fields?

like this from links.def

# Field Number of some important fields. The number is from %db_def above
# where the first field equals 0.

$db_title = 1;
$db_url = 2;
$db_modified = 3;
$db_category = 4;
$db_keywords = 5;
$db_description = 6;
$db_detaildescription =7;
$db_contact_name = 8;
$db_contact_email = 9;

I think I might have my problem there?

You see how contact_name is 'Contact Name'

so which should I use on password.cgi file and how to do it.

You probaply see that I am non programmer, but I am trying to learn (I just bought one of the "Camel" books...

Thank you
Hank