Gossamer Forum
Home : Products : DBMan : Customization :

email does not show up...

Quote Reply
email does not show up...
I am using JP's password lookup, and the email does not show up, but everything else works aok. Has anyone ever seen this?

Greg
Quote Reply
Re: email does not show up... In reply to
There was a bug with this Mod, which should have been fixed and posted in JPDeni's web site. The bug fix was also posted in this Forum. Use the Search option in this forum to find the Threads that discuss this issue.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------


Quote Reply
Re: email does not show up... In reply to
I doubt that this is a problem with Jp's script. I am on a winnt system, and I have tried using an alernate mail program.

$mailprog = 'c:/winnt/system32/blat.exe';

Blat.exe allows the scipt to work, but it does not actually send the message. I am taken to this page, as always...

<hr>Account Created

Your account has been set up! After you receive your password, use your username and password to log in.
<hr>


So I have spent about an hour reading posts about setting up smtp on a win NT. I was wondering if you could you be more specific about what I would have to do in order to get SMTP working?

Thanks always!

Greg
Quote Reply
Re: email does not show up... In reply to
Oh...You mean that the email is not sent when you execute the script...Ah..I see.

I don't know how more specific I can be about sending mail via SMTP Server other than what I have written in this forum. What are you having problems with??

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------




[This message has been edited by Eliot (edited October 26, 1999).]
Quote Reply
Re: email does not show up... In reply to
The problem is that I do not really know much about SMTP and mail. I have lots of posts about it, and I still have no clue how to enable it.

Is it just a one line fix? Is it a whole sub? It is just a chunk of code here and there?

Who know? Not I.

Can you help? or should I just keep slogging through the posts.

Greg
Quote Reply
Re: email does not show up... In reply to
You replace the Sendmail codes with SMTP codes, like the following:

Code:
my $mailer = new Mailer ( { smtp => '$smtpserver' } )
or die "Can't init mailer: $Mailer::error";
$mailer->send ( {
to => $rec{'Email'},
from => $admin_mail,
subject => "$subject",
msg => '
INSERT TEXT
$rec{'URL'}
';
} )
or die "Can't send mail: $Mailer::error";

Create the following variables in your default.cfg file:

Code:
$admin_mail = "account\@mydomain.com";
$smtpserver = "mydomain.com";
$subject = "Mail from $html_title";

Hope this is more clear and helps.

Good luck! Smile

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------


Quote Reply
Re: email does not show up... In reply to
I am not entirely sure where to put the first chunk of code that you gave me.
Code:
my $mailer = new Mailer ( { smtp => '$smtpserver' } )
or die "Can't init mailer: $Mailer::error";
$mailer->send ( {
to => $rec{'Email'},
from => $admin_mail,
subject => "$subject",
msg => '
INSERT TEXT
$rec{'URL'}
';
} )
or die "Can't send mail: $Mailer::error";

I could only guess that is would replace the following code of db.pl

Code:
#### Following fifteen lines added for secure_password_lookup mod
open (MAIL, "$mailprog") | | &cgierr("Can't start mail program");
print MAIL "To: $in{'email'}\n";
print MAIL "From: $admin_email\n";
print MAIL "Subject: $html_title Account Created\n\n";
print MAIL "-" x 75 . "\n\n";
print MAIL "Your account at $html_title has been created.\n\n";
print MAIL "Your $html_title User ID is: $in{'userid'}\n";
print MAIL "Your $html_title password is: $in{'pw'}\n\n";
print MAIL "Please keep this email for future reference.\n\n";
print MAIL "To log on, go to\n\n";
print MAIL "$db_script_url?db=$db_setup\n";
print MAIL "and enter your User ID and password.\n\n";
print MAIL "Please contact $html_title support at: $admin_email\n";
print MAIL "if you have any questions.\n\n";
close (MAIL);

Can you be more specific... thanks again. I really do appreciate your help!

Greg

[This message has been edited by maps (edited October 27, 1999).]

[This message has been edited by maps (edited October 27, 1999).]
Quote Reply
Re: email does not show up... In reply to
I have tried using different code for blat.exe, and that did not work.

and I have tried adding this code to the

sub add_record {
###right after ----->&html_add_success;

Code:


###################
$body_text ='this is a test';

my $mailer = new Mailer ( { smtp => 'smtp.erols.comt' } ) or die "Can't
init mailer: $Mailer::error";
$mailer->send ( {
to => 'maps1@erols.com',
from => $in{'Email'},
subject => "Subject goes here",
msg => $body_text
} ) or die "Can't send mail: $Mailer::error";

####################

With mailer.pm set up and linked to via the default.cfg file.

What is wrong??? This should work!
Quote Reply
Re: email does not show up... In reply to
Yes, the "chunk" of codes I gave you is to replace the SENDMAIL codes!

I found two things wrong with your last post:

1) The SMTP server is wrong, I think. You have added a t after com. Shouldn't it be smtp.erols.com.

2) How are you "linking" Mailer.pm? It should only be "required" via the following codes:

Code:
require "/path/to/Mailer.pm";

Hope this helps.

(I would really encourage to read the previous Threads that I wrote instructions for SMTP, which are more detailed.)


Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------


Quote Reply
Re: email does not show up... In reply to
Eliot,
I am pretty sure that I have read every single thread about this in the forum. I have tried several times, with several different set-ups, but nothing seems to work...

I have changed my script so that it no longer has

Code:
require $db_script_path . "/Mailer.pm";

But infact has exactly what you said...
Code:
require "D:/InetPub/wwwroot/heritageantiquemaps/auction/orders/database/Mailer.pm";

But I get this bad boy.

CGI ERROR
==========================================
Error Message : Can't start mail program
Script Location : d:\inetpub\wwwroot\heritageantiquemaps\auction\orders\database\db.pl
Perl Version : 5.00503
Setup File : default.cfg



I have placed a copy of my database script at the following link.

http://207.96.11.60/jpdeni/db.txt

[This message has been edited by maps (edited October 27, 1999).]
Quote Reply
Re: email does not show up... In reply to
Well, the problem is with your SMTP server.
Try using the following:

Code:
erols.com

See if that works. The problem is NOT with the mail routine or the Mailer.pm. The problem is with the SMTP Server reference.

Contact your Hosting Company/ISP and ask them what your SMTP server is.

Hope this helps.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------


Quote Reply
Re: email does not show up... In reply to
It was a good guess, but no luck! I am sure that my smtp is "smtp.erols.com" as I use it in tons of other area's of my online life.

Would you mind taking a look at the db.txt that I posted online? I hope (beyond hope) that there is something in there that you could say "THERE IT IS, WHAT A DUMMY!!! He Forgot........"
it is at
http://207.96.11.60/jpdeni/db.txt



Anyway, the program is doing everything else that it is supposed too which I can see from the cgi error that it out-puts.

Code:
db : default
email : maps1@erols.com
pw : mixuxawa
signup : Create
uid :
userid : Test

Environment Variables




[This message has been edited a couple of times by a really nice guy named Greg who goes by "maps" (edited October 27, 1999).]

[This message has been edited by maps (edited October 27, 1999).]
Quote Reply
Re: email does not show up... In reply to
These codes are DEFINITELY wrong:

Code:
to => 'maps1@erols.com',
from => $in{'Email'},

If all you want to do is send the message to yourself, then you would use the following codes:

Code:
to => 'maps1@erols.com',
from => 'maps1@erols.com',

If you want to send it to the record owner, then you would use the following:

Code:
to => $rec{'Email'},
from => 'maps1@erols.com',

Hope this works and helps.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------


Quote Reply
Re: email does not show up... In reply to
Guess what still does not work.... Any other thoughts? I do appreciate your help.


CGI ERROR
==========================================
Error Message : Can't start mail program
Script Location : d:\inetpub\wwwroot\heritageantiquemaps\auction\orders\database\db.pl
Perl Version : 5.00503
Setup File : default.cfg

Form Variables
-------------------------------------------
db : default
email : maps1@erols.com
pw : fosikoni
signup : Create
uid :
userid : ham
Quote Reply
Re: email does not show up... In reply to
Try using the full path to the Mailer.pm file, like the following:

Code:
require "/path/to/Mailer.pm";

ALSO, you still have the mailprog codes in the following sub-routine:

sub signup

You need to replace ALL Sendmail codes in that sub-routine and all other sub-routines with the SMTP mailer codes.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------


Quote Reply
Re: email does not show up... In reply to
Got it!
Now I just have to make it work with jp's mod.




[This message has been edited by maps (edited October 27, 1999).]
Quote Reply
Re: email does not show up... In reply to
I don't understand you at all...You write a response in your DBMAN Thread that you "got it" and then you post this Thread in the CGI/Perl Forum. Are you still having problems or what? If you have the mailer working now, all you have to do to have it work with JPDeni's signup mod is the following:

Replace $body_text in the msg line with the following:

Code:
print MAIL "Your account at $html_title has been created.\n\n";
print MAIL "Your $html_title User ID is: $in{'userid'}\n";
print MAIL "Your $html_title password is: $in{'pw'}\n\n";
print MAIL "Please keep this email for future reference.\n\n";
print MAIL "To log on, go to\n\n";
print MAIL "$db_script_url?db=$db_setup\n";
print MAIL "and enter your User ID and password.\n\n";
print MAIL "Please contact $html_title support at: $admin_email\n";

WITH THE FOLLOWING:

Code:
msg => '
Your account at $html_title has been created.

Your $html_title User ID is: $in{'userid'}

Your $html_title password is: $in{'pw'}

Please keep this email for future reference.

To log on, go to
$db_script_url?db=$db_setup

and enter your User ID and password.

Please contact $html_title support at: $admin_email';

Do the same thing with the other sub-routines where you want to include record information in the email message, like the following example:

msg => '
This Record, $rec{'ID'}, is cool.
The characteristics of this record
are as follows:

$rec{'GetPerlBook'}
$rec{'LearningBasics'}
$rec{'IsFunandExciting'}
';

Replace the stuff between the single quotes with the name of the fields in your default.cfg file.

Hope this helps.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------