Gossamer Forum
Home : Products : DBMan : Customization :

Secure Look-up Mod No Email Got

Quote Reply
Secure Look-up Mod No Email Got
Hello!

I have installed the secure look-up mod on two servers - on with the demo - the other on a server with quite a bit of modifications -

I am having the same problem on both; everything seems to work fine except the client does not recieve an email with the password - I have checked path to sendmail and it seems fine -

Here is one thing (which may having nothing to do with nothing)

Directions are as follows:

# Full path to sendmail on your system
$mailprog = "|/usr/lib/sendmail -t -oeq";
# Your email address
$admin_email = 'you@yourserver.com';

I put this in:

# Full path to sendmail on your system
$mailprog = "/usr/lib/sendmail";
# Your email address
$admin_email = 'support@sysadminsrus.com';

I do not get error message - just no mail sent to confirm password (or when I request a "new password"

Any help is appreciated,

Jim
Quote Reply
Re: Secure Look-up Mod No Email Got In reply to
The problem might be this:

Code:
$admin_email = 'you@yourserver.com';

It needs to be this:
Code:
$admin_email = 'you\@yourserver.com';

Hope this helps !

----------------
donm
Quote Reply
Re: Secure Look-up Mod No Email Got In reply to
No, that change did not seem to make a differnece - I am stumped - no apparent error message - the password and email go to the pass file - just no emailing happening,

Jim
Quote Reply
Re: Secure Look-up Mod No Email Got In reply to
it is not really a reply but more of a query, I have the same problem I can not get the email program to email the password. I have tried the suggestions in this thread and a couple of other possible variations but to no avail I still can get it to work. something interestin happened when I tried when I cahnged the path to the email program to "/usr/lib/sendmail"; as suggested by my ISP i got an error could not start program. when i return it to "/usr/lib/sendmail- t- eq"; or"/usr/lib/sendmail-t"; i don't get the error but I still can't get the program to send the passwords.
any suggestions are very appriciated.


Quote Reply
Re: Secure Look-up Mod No Email Got In reply to
Your ISP could possibly not allow sendmail, which means you will have to use SMTP..

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
* Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
* Search Forums!
* Say NO to Duplicate Threads. :)
----------------------








Quote Reply
Re: Secure Look-up Mod No Email Got In reply to
Hello!

I have it working fine now; this is what it looks like:

# Full path to sendmail on your system
$mailprog = "|/usr/lib/sendmail -t";
# Your email address
$admin_email = 'support@sysadminsrus.com';


notice there is no "-oeq" anyone know what this would be for in anycase,

thanks to don for your help - I did need to add \ before @ in several other areas of script as I went along and got errors.

Jim
Quote Reply
Re: Secure Look-up Mod No Email Got In reply to
my ISP clain (on their support site to have sendmail) i have contacted them but no reply yet. How does SMTP work, and How could I configue it.
thanks in advance
Quote Reply
Re: Secure Look-up Mod No Email Got In reply to
I think that you should just use the mailer.pm from "links" to send your mail. It is not very hard to configure and it will do everything that you want it to do Smile Just a suggestion.

Here is a sub that is very similar to what you would need to stick in your db.cgi.

Code:
sub forward_email {
# --------------------------------------------------------
# This subroutine added foward record mod
#
unless ($in{'from_email'}) { $message = "You must fill in your email address<BR>"; }
unless ($in{'from_email'} =~ /.+\@.+\..+/) { $message = "Your email address is not in the correct format.<BR>"; }
unless ($in{'to_email'}) { $message = "You must fill in the recipient's email address<BR>"; }
unless ($in{'to_email'} =~ /.+\@.+\..+/) { $message = "The recipient's email address is not in the correct format.<BR>"; }
unless ($in{'subject'}) { $message .= "You must fill in a subject for your message.<BR>"; }
unless ($in{'emailmessage'}) { $message .= "Your email message is empty.<BR>"; }

if ($message) {
chomp($message);
&html_forward_email_form($message);
return;
}

my $mailer = new Mailer ( { smtp => 'your.smtp.server.com' } ) or die "Can't
init mailer: $Mailer::error";
$mailer->send ( {
To => "$in{'to_email'}",
from => "$in{'from_email'}",
subject => "$in{'subject'}",
msg => "$in{'emailmessage'}",
} ) or die "Can't send mail: $Mailer::error";
&html_info_sent;
}


Then all you would need to do was add a sub in the html.pl file that would collect that information you are looking for. In the above example, the sub is "html_forward_email_form"

then add a require statement in the default.cfg for the mailer.pm and you are good to go!



[This message has been edited by dataKing (edited February 07, 2000).]
Quote Reply
Re: Secure Look-up Mod No Email Got In reply to
Thanks data king, you make sound so easy, but sorry it is not that simple for me.(I am not a programmer)
1-what I have done to the code you gave me is changed the following linemy $mailer = new Mailer ( { smtp => 'smtp.primus.com.au' } ) or die "Can'tinit mailer: $Mailer::error";
is that all I need to do?
2-is this what I need sub html_forward_email_form {
#----------------------------------------------------------
my ($message) = $_[0];
%rec = &get_record($in{$db_key});

unless ($in{'email_message'}) {
foreach $col (@db_cols) {
$in{'email_message'} .= "$col: $rec{$col}\n";
}
}

&html_print_headers;

print qq|
<html><head><title>$html_title: Send an email</title></head>
<body bgcolor="#DDDDDD">
<center>
<table border=1 bgcolor="#FFFFFF" cellpadding=5 cellspacing=3 width=500 align=center valign=top>
<tr><td colspan=2 bgcolor="navy">
<FONT FACE="MS Sans Serif, arial,helvetica" size=1 COLOR="#FFFFFF">
<b>$html_title: Send an email</b></td></tr>
<tr><td>
<p><center><$font_title><b>
Send an email
</b></font></center><br>
|;

if ($message) { print qq|There was a problem: $message|; }
print qq|
<$font>Fill in your email address, the subject of your email and the
message you wish to send to $rec{'Name'}.</font>
|;

print qq|
<form action="$db_script_url" method="POST">
<input type=hidden name="db" value="$db_setup">
<input type=hidden name="uid" value="$db_uid">
<table><tr><td align=right><$font>Your email address:</font></td>
<td><input type=text name="email" value="$in{'email'}" size=40></td></tr>
<tr><td align=right><$font>Recipient's email address:</font></td>
<td><input type=text name="to_email" value="$in{'to_email'}" size=40></td></tr>
<tr><td align=right><$font>Subject:</font></td>
<td><input type=text name="subject" value="$in{'subject'}" size=40></td></tr>
<tr><td align=right><$font>Your message:</font></td>
<td><textarea name="emailmessage" cols=40 rows=10 wrap="virtual">$in{'emailmessage'}</textarea></td></tr>
</table>
<center>
<INPUT TYPE="SUBMIT" NAME="forward_email" VALUE="Send Record">
<INPUT TYPE="RESET" VALUE="Reset Form">
</center>
</form>
|;

&html_footer;
print qq|</td></tr></table></body></html>|;
}

###############################################################################
#file: html.pl #
# new subroutine #
# sub html_forward_email_success #
###############################################################################

sub html_forward_email_success {
#-----------------------------------------------
&html_print_headers;

print qq|
<html><head><title>$html_title: Send an email</title></head>
<body bgcolor="#DDDDDD">
<center>
<table border=1 bgcolor="#FFFFFF" cellpadding=5 cellspacing=3 width=500 align=center valign=top>
<tr><td colspan=2 bgcolor="navy">
<FONT FACE="MS Sans Serif, arial,helvetica" size=1 COLOR="#FFFFFF">
<b>$html_title: Send an email</b></td></tr>
<tr><td><p><center><$font_title><b>
Send an email
</b></font></center><br>
|;

print qq|<$font>Your email message was sent.</font>|;

&html_footer;
print qq|</td></tr></table></body></html>|;
}
and do I need to do any modifications?
3- how to add a require statment to mailer.pm in the cfg(and where does mailer.pm has to be?
I thinks that's all for now.
regards

Quote Reply
Re: Secure Look-up Mod No Email Got In reply to
following on, all I really wanted done was on sign up to have the autogenerated password automatically sent to the user so they can log on.
thank.
Quote Reply
Re: Secure Look-up Mod No Email Got In reply to
no one needs to answer the above querry, I found out finally form my ISP that they do not suport sendmail. So I have moved to someone who does and tried it it works perfectly(and I thought it was me all the time)
thanks