Gossamer Forum
Home : Products : DBMan : Customization :

"Email This" Option

Quote Reply
"Email This" Option
Hi There, JP!

I told you we'ld come up with some more challenging ideas for you. How about this one:

Our old database (which was sorely limited in most other areas) had one feature we'ld like to see with DBman. That is an option for a default user to choose to send a copy of any one post via email either to themselves or to a 3rd party.

I took a peak at the source code from our old database and found this:

<a href="forward.asp?webtag=reciperequests&msg=2587.1" target=_parent onMouseOver="window.status='Send above Message via Email';return true;">
<img height=13 width=26 src="/i/mb/forward_icon.gif" border=0 align=absbottom alt="Send above Message via Email">E-mail this</a>

Notice that it uses the record number to identify the record to send. This brings up another question. Our new database is quickly approaching 1500 records. If we search for record number "4" every instance of "4" in a record number is returned, not just the one record number "4."

Can this be improved? Will it affect any attempt to impliment the Email feature we want? Got any suggestions or ideas?

Thanks again,
BB



------------------
BigBritchs
BigBritchs@IDunno4Recipes.com



[This message has been edited by BigBritchs (edited June 27, 1999).]
Quote Reply
Re: "Email This" Option In reply to
(The cookies are all gone. Mmmmmmmmmmmm!) Smile

We can make a "Send this record" subroutine for DBMan. That's not too hard. Would you want the form where the user enters the recipient's email address to be directly on the record or would you want them to click a link (or button) and go to another form to enter the email address?

Regarding the key value -- if we use the get_record subroutine, it will look for the whole number. So if you use the command

&get_record("4");

you'll just get record 4 and not record 14 or 40. Another way to do this, if you are looking for a particular record is to add the "&ww=1" flag, which means "whole words." That, too, will only give you record 4, and not 14 or 40.

I'll be glad to help you with the "Mail this record" mod. Just let me know where you want the form, 'cause it makes a difference in the coding.


------------------
JPD





Quote Reply
Re: "Email This" Option In reply to
Rather than creating a sub-routine, you may want to consider using the Birdcast.cgi (recommend script) from

www.bignosebird.com/cgi.shtml .

Bobsie has written a great mod for using this script with LINKS and it would surely work with DBMAN (with a little extra tweaking). HIs mod is located at the following web page:

http://www.orphanage.com/...f/recommend_mod.html

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
Quote Reply
Re: "Email This" Option In reply to
Hi Eliot!

Thanks for the suggestion. I will certainly look into it. We currently use a BNB script for our "Tell-A-Friend" Site referral, so I am somewhat familiar with them and found that script to be relatively easy to work with.

As far as "tweeking" however, I am still quite green! JPDeni has helped me quite a bit and so has looking around some of the other posts on this forum.

Thanks again,
BB

------------------
BigBritchs
BigBritchs@IDunno4Recipes.com
http://www.IDunno4Recipes.com





[This message has been edited by BigBritchs (edited June 28, 1999).]
Quote Reply
Re: "Email This" Option In reply to
Hi JP!

Sorry to hear those cookies are gone already Frown

I think we would want a button on the same line as the "Main Menu/Search/List ALL/Home" in the footer. A user could choose it, enter both sender and receiver email addys, choose "Send" and then be returned to the original page.

Now this gets weired. We know there are some out there who have email access but do not have internet access. We would like to have the 2nd party return to our site to view the recipe and hopefully come back again and again. BUT, if the recipient doesn't have internet access, we would want them to at least get the recipe that was sent to them.

Is there a way for the browser to "know" the difference and send only a link back to our site for the recipe that was sent, but "know" when an email addy is not capable of using a link, and so "knowing" send the entire recipe? Are we reaching for the moon on this one?

Otherwise, I guess we'll want to send both the recipe requested by the sender AND a link back to our site.

Regarding the key value issue, I assumed from what you said that a user searching for a particular recipe by its ID # would have to choose the "Whole Words" Search Option and made a comment to that effect on our search page.

Thanks,
BB



------------------
BigBritchs
BigBritchs@IDunno4Recipes.com
http://www.IDunno4Recipes.com



Quote Reply
Re: "Email This" Option In reply to
(I sure enjoyed them cookies while they were here!! Smile )

I'm gonna have to get back to you on this. I really just came on to see if there were some quick questions I could answer. This one will be a little long and I have some pressing business to attend to. I will get to it tomorrow, though.


------------------
JPD





Quote Reply
Re: "Email This" Option In reply to
I think I have it. Smile

There is no way to tell from an email address whether the person has web access or not -- at least as far as I know.

You are correct. You might need to tell folks that, if they have a specific recipe number they are looking for, they will need to check the "whole word" box on the search form.

Okay. I think this should work. I haven't tested it, except for syntax errors.

The link to email the record can't be within the html_footer. It will have to be within your html_record_long subroutine. That's the only way the script will know which record it needs to get.

In html_record_long, probably at the bottom of the display, add

print qq|<a href="$db_script_link_url&send_record_form=1&$db_key=$rec{$db_key}">Email this recipe to a friend</a>|;

Add two new subroutines to html.pl:

Code:
sub html_send_record_form {
# --------------------------------------------------------

my ($message) = $_[0];

$page_title = "Send a Recipe to a Friend";
&html_page_top;

$submit_button = "Send Recipe";
$reset_button = "Reset Form";

$auth_modify_own=0;
%rec=&get_record($in{$db_key});

# < -- Start page text -- >
print qq|
[Put whatever you want as introductory text here. If you want to use anything from the record,
use the $rec{'FieldName'} variables.
|;
# < -- End page text -->

if ($message) {
print qq|<$font>There were problems with sending your email message: $message</font>|;
}

print qq|
<form action="$db_script_url" method="POST" name="form1">
<input type=hidden name="db" value="$db_setup">
<input type=hidden name="uid" value="$db_uid">
<input type=hidden name="$db_key" value="$rec{$db_key}">
<table>
<tr><td><$font>Your email address:</font></td>
<td><input type="text" name="sender_email" value="$in{'sender_email'}" size="40"></td></tr>
<tr><td><$font>The recipient's email address:</font></td>
<td><input type="text" name="recip_email" value="$in{'recip_email'}" size="40"></td></tr>
<tr><td colspan=2>
<p><center>
<INPUT TYPE="SUBMIT" NAME="send_record" VALUE="$submit_button">
<INPUT TYPE="RESET" VALUE="$reset_button">
</center></p></td></tr></table></form>
|;

&html_footer;
&html_page_bottom;
}

sub html_send_record_success {
# --------------------------------------------------------

my ($message) = $_[0];

$page_title = "Recipe has been sent";
&html_page_top;

# < -- Start page text -- >
print qq|
<$font>The recipe has been sent to $message.</font>
|;
# < -- End page text -->

&html_footer;
&html_page_bottom;
}

Add the following to your .cfg file, if it's not already there

# Email program on your system
$mailprog = "|/usr/sbin/sendmail -t -oeq";

Add the following lines to db.cgi, sub main, somewhere with the other "elsif" statements

Code:
elsif ($in{'send_record_form'}) { if ($per_view) { &html_send_record_form; } else { &html_unauth; } }
elsif ($in{'send_record'}) { if ($per_view) { &send_record; } else { &html_unauth; } }

Add the following new subroutine to db.cgi

Code:
sub send_record {
# --------------------------------------------------------

my ($message,$mailtext);

if ($in{'sender_email'}) {
unless ($in{'sender_email'} =~ /.+\@.+\..+/) {
$message = "Your email address is not in the correct format.<BR>";
}
}
else {
$message = "You must enter your email address.<BR>";
}
if ($in{'recip_email'}) {
unless ($in{'recip_email'} =~ /.+\@.+\..+/) {
$message = "The recipient's email address is not in the correct format.<BR>";
}
}
else {
$message = "You must enter the recipient's email address.<BR>";
}

if ($message) {
&html_send_record_form($message);
return;
}
$auth_modify_own = 0;
%rec = &get_record($in{$db_key});

$mailtext = qq|[format the output of the email message here, using the $rec{'FieldName'} variables.
Use \n wherever you would like a new line to appear. You can also just use separate lines within
the text of the message and they will appear as separate lines within the email message.|;

open (MAIL, "$mailprog") or &cgierr("Can't start mail program");
print MAIL "To: $in{'recip_email'}\n";
print MAIL "From: $in{'sender_email'}\n";
print MAIL "Subject: Recipe from $html_title\n\n";
print MAIL $mailtext;
close MAIL;

&html_send_record_success($in{'recip_email'});
}

That should do it. Let me know if it isn't what you had in mind.



------------------
JPD





Quote Reply
Re: "Email This" Option In reply to
It doesn't matter where you place the subroutines, so long as they're not in the middle of another subroutine. Smile



------------------
JPD





Quote Reply
Re: "Email This" Option In reply to
Hi JP!

This looks like it otta work (like I would know!). Anyway, I'll give it a try ASAP.

One question: does it matter where in any particular file I put the new codes or will anywhere do? Just trying to anticipate glitches before I cause them.

Thanks again,
BB


------------------
BigBritchs
BigBritchs@IDunno4Recipes.com
http://www.IDunno4Recipes.com



Quote Reply
Re: "Email This" Option In reply to
Thanks JP!

I am going to give it a shot right now!

BB


------------------
BigBritchs
BigBritchs@IDunno4Recipes.com
http://www.IDunno4Recipes.com



Quote Reply
Re: "Email This" Option In reply to
I'll be looking forward to hearing how it works. (It's sure nice to have all these guinea pigs for my new code!! Wink )

I'll be checking in later. I gotta go make dinner.



------------------
JPD





Quote Reply
Re: "Email This" Option In reply to
Hi JP!

Well, I put it in as best I could, but I'm not seeing anything when I try it. Following your instructions I put the following code at the end of the html_record_long subroutine after the table and before the End of Record Display "}" tag. Should it go after the "}"?

</TABLE>
|;

print qq| <a href="$db_script_link_url&send_record_form=1&$db_key=$rec{$db_key}">Email this recipe to a friend</a> |;

# <-- End of record display -->

}


So far the changes haven't caused any probelms with normal operations, I just can't see the command to test it.

Waddaya Tink?

BB


------------------
BigBritchs
BigBritchs@IDunno4Recipes.com
http://www.IDunno4Recipes.com





[This message has been edited by BigBritchs (edited June 29, 1999).]
Quote Reply
Re: "Email This" Option In reply to
That's where it should go. I may have to take a look myself to see what's up. Can you make your html.pl script available on the web for me?


------------------
JPD





Quote Reply
Re: "Email This" Option In reply to
Hi JP!

Sorry about that. I was working with a set of backed up files so I wouldn't do any irreversable damage and never copied them over to the working cgi-bin folder. DUMB!

I copied the files over to the right folder and gave it a go. The "E Mail This Recipe to a Friend" shows up on the record, but I get an error message that reads "Error: Unknown Action - The database program received a command it did not understand."

I put all the relevant files in a new folder at:

http://www.IDunno4Recipes.com/emailop

Let me know if you can see what I missed.

Thanks,
BB

------------------
BigBritchs
BigBritchs@IDunno4Recipes.com
http://www.IDunno4Recipes.com





[This message has been edited by BigBritchs (edited June 30, 1999).]

[This message has been edited by BigBritchs (edited June 30, 1999).]
Quote Reply
Re: "Email This" Option In reply to
Your URL wouldn't let me see the directory listing, but I was able to download the db.cgi script.

I guess I wasn't clear about where to put:

Code:
elsif ($in{'send_record_form'}) { if ($per_view) { &html_send_record_form; } else { &html_unauth; } }
elsif ($in{'send_record'}) { if ($per_view) { &send_record; } else { &html_unauth; } }

Move that code to somewhere in the list of "elsif" statements further up in db.cgi, around the place where

Code:
elsif ($in{'add_record'}) { if ($per_add) { &add_record; } else { &html_unauth; } }
elsif ($in{'view_search'}) { if ($per_view) { &html_view_search; } else { &html_unauth; } }

is. It needs to be in that section.

When you asked about where to put the code, I was just thinking about the subroutines. Sorry 'bout that.


------------------
JPD





Quote Reply
Re: "Email This" Option In reply to
Hi JP!

Yeppers, I did put those lines in the wrong place. I followed your instructions and all seems well, except one little thing....

I've sent numerous recipes to various addresses and even though the script says they were sent, I've not received any of them!

I have a feeling this is related to the problems we had installing BigNoseBird's script for user referrals to other email addys. In that scenario, we had to redirect the code as follows

# Use $SMTP_SERVER
# $SMTP_SERVER="localhost";
$SMTP_SERVER="smtp.securewebs.com";

So I tried:

# Email program on your system
# $mailprog = "|/usr/sbin/sendmail -t -oeq";
$mailprog = "smtp.securewebs.com";

and got a CGI ERROR message that I didn't get before, so I put it back the way it was.

Is this an issue we can work out or do I need to call my server admin and get him in on the deal?

Thanks again,
BB



------------------
BigBritchs
BigBritchs@IDunno4Recipes.com
http://www.IDunno4Recipes.com



Quote Reply
Re: "Email This" Option In reply to
It probably does have something to do with sendmail and the smtp server, but you have just gotten into an area I know nothing about. There's something in the Links script about a Mailer.pm module. I'll look over it tonight and see if I can figure out how to use it.

Or someone else might have experience with this and be able to answer. (Hint, hint! Smile )


------------------
JPD





Quote Reply
Re: "Email This" Option In reply to
Hi JP!

OK, I'll ask my server admin to take a look at it and let you know what he says.

Don't knock yourself out, ours is probably a somewhat unique sitch.

Thanks again,
BB

------------------
BigBritchs
BigBritchs@IDunno4Recipes.com
http://www.IDunno4Recipes.com



Quote Reply
Re: "Email This" Option In reply to
Hi there, I modfied everything as stated by JPDeni, but get a CGI error message :

fatal error: Undefined subroutine &main::html_page_top called at /home/..../html.pl line 1631

I guess html_top_page has to be defined as well but JPDeni didn't mention it ?

Thanks

Luke
Quote Reply
Re: "Email This" Option In reply to
Your page formatting may be a little different that the example provided above.

Remember when using coding written for others, that you have to modify the code to suit your individual database. For example field names provided may not match your field names Smile

In this case $html_page_top is used with the user friendly mod to define the page header.

For your database the page headers may be defined in: &html_print_headers;

Just make the necessary changes to match your page formatting and it should work just fine Smile



Quote Reply
Re: "Email This" Option In reply to
Yeah. You do need to understand that when I write code for folks on the forum, I often already know what sort of setup they have for their database. (I had worked with "BigBritchs" for qute a while when I wrote this.)



------------------
JPD





Quote Reply
Re: "Email This" Option In reply to
In the place of

&html_page_top

use

Code:
&html_print_headers;

print qq|
<html><head><title>$html_title: $page_title</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: $page_title</b></font></td></tr>
<tr><td><p><center><$font_title><b>$page_title</b></font></center><br>
|;

In the place of

&html_page_bottom

use

Code:
print qq|
<table border=0 width=100%>
<tr>
<td align=left><$font>Copyright 1998
<A HREF="http://www.gossamer-threads.com">Gossamer Threads Inc.</A></font></td>
<td align=right>
<a href="http://www.gossamer-threads.com/scripts/dbman/">
<img src="http://www.gossamer-threads.com/images/powered.gif"
border=0 width=100 height=31 alt="Database Powered by Gossamer Threads Inc."></a>
</td></tr>
</table>
|;

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


------------------
JPD





Quote Reply
Re: "Email This" Option In reply to
Hi JPD. Thanks, that worked !!!!!!!
But I still have a problem : in db.cgi, the lines that say

"format the output of the email message here, using the $rec{'FieldName'} variables. Use \n wherever you would like a new line to appear. You can also just use separate lines within the text of the message and they will appear as separate lines within the email message.|;

, when I put a variable, like $rec{'FirstName'} , that spot appears blank in the test e-mail I receive.

Am I doing something wrong , or I don't know how to refer the variable in the text ?
Could you please give me an example ?

Thanks,

Luke

PS. Any idea what should be done so that sendmail sends the e-mail in html format not in plain text ( Content-type: text/plain vs. Content-type: text/html ) ?



[This message has been edited by lukebrenner (edited March 26, 2000).]
Quote Reply
Re: "Email This" Option In reply to
If your $rec{'FieldName'} variables are blank, there are two possible causes. One is that you aren't using the correct FieldName. These must be exactly the same as in the .cfg file, including capitalization.

If that's not the problem, then you are not getting the record returned from the

%rec = &get_record($in{$db_key});

line.

Try switching some things around. Instead of

Code:
if ($in{'recip_email'}) {
unless ($in{'recip_email'} =~ /.+\@.+\..+/) {
$message = "The recipient's email address is not in the correct format.<BR>";
}
}
else {
$message = "You must enter the recipient's email address.<BR>";
}
if ($message) {
&html_send_record_form($message);
return;
}
$auth_modify_own = 0;
%rec = &get_record($in{$db_key});

use

Code:
if ($in{'recip_email'}) {
unless ($in{'recip_email'} =~ /.+\@.+\..+/) {
$message = "The recipient's email address is not in the correct format.<BR>";
}
}
else {
$message = "You must enter the recipient's email address.<BR>";
}
%rec = &get_record($in{$db_key});
unless ($rec{$db_key}) {
$message = "No record was returned from the search";
}
if ($message) {
&html_send_record_form($message);
return;
}
$auth_modify_own = 0;

See what happens.


------------------
JPD







[This message has been edited by JPDeni (edited March 26, 2000).]
Quote Reply
Re: "Email This" Option In reply to
JPD, I get a CGI 500 error message when I try to access db.cgi.

I tried debugging int in the shell with perl -cw db.cgi and I get :



syntax error at db.cgi line 1189, near "$db_key) "
syntax error at db.cgi line 1210, near "}"



even though it doesn't seem to be a syntax error.

PS I forgot to mention :

1) I do not use the autogenerate function for the forms (designed them myself)
2) I use the right syntax for the fieldnames . Ex : I have a fieldname called EXACTLY like that : FirstName

[This message has been edited by lukebrenner (edited March 26, 2000).]
Quote Reply
Re: "Email This" Option In reply to
My typo. I see it now.

It should be

Code:
unless ($rec{$db_key}) {

(I'll fix in my previous post it in case anyone is reading this later on.)


------------------
JPD





Quote Reply
Re: "Email This" Option In reply to
OK JPD ... obviously I get the error

"There were problems with sending your email message: No record was returned from the search"


So something must be really wrong. You think it has something to do with the fact that I do not use the autogenerate forms feature ? Or is this a stupid question ?

This is the database definition I have in default.cfg :

%db_def = (
ID => [0, 'numer', 5, 5, 1, '', ''],
Title => [1, 'alpha', 0, 255, 1, '', ''],
FirstName => [2, 'alpha', 25, 25, 1, '', ''],
LastName => [3, 'alpha', 25, 25, 1, '', ''],
Number => [4, 'alpha', 5, 5, 1, '', ''],
Street => [5, 'alpha', 30, 30, 1, '', ''],
Bloc => [6, 'alpha', 4, 4, 0, '', ''],
Floor => [7, 'alpha', 2, 2, 0, '', ''],
Entry => [8, 'alpha', 3, 3, 0, '', ''],
Apartment => [9, 'alpha', 5, 5, 1, '', ''],
Sector => [10, 'alpha', 2, 2, 0, '', ''],
PostalCode => [11, 'alpha', 8, 8, 1, '', ''],
City => [12, 'alpha', 25, 30, 1, '', ''],
StateProvince => [13, 'alpha', 25, 30, 0, '', ''],
Country => [14, 'alpha', 20, 25, 1, '', ''],
Email => [15, 'alpha', 40, 50, 0, '', ''],
WebPage => [16, 'alpha', 40, 60, 0, 'http://', '^http://'],
Phone => [17, 'alpha', 20, 20, 0, '', ''],
CellPhone => [18, 'alpha', 20, 20, 0, '', ''],
Fax => [19, 'alpha', 20, 20, 0, '', ''],
Profession => [20, 'alpha', 40, 40, 1, '', ''],
Age => [21, 'numer', 2, 2, 1, '', ''],
Height => [22, 'alpha', 10, 10, 1, '', ''],
Weight => [23, 'alpha', 10, 10, 1, '', ''],
Eyes => [24, 'alpha', 20, 20, 1, '', ''],
Hair => [25, 'alpha', 20, 20, 1, '', ''],
MaritalStatus => [26, 'alpha', 0, 255, 1, '', ''],
Children => [27, 'alpha', 0, 255, 1, '', ''],
HowMany => [28, 'alpha', 2, 2, 1, '', ''],
Comments => [29, 'alpha', '40x3', 800, 1, '', '']
);
Quote Reply
Re: "Email This" Option In reply to
No, not using autogenerate won't be a problem.

But that does tell me something, anyway.

Look in the source code of your send record form. There should be a hidden field that looks something like:

<input type="hidden" name="ID" value="something">

The something above would be the $db_key value of the record you're sending. Is it there?

If not, you'll need to look to the link that you use to get to the send record form. You need to be sure that it is within sub html_record (or sub html_record_long, if you're using the short/long display mod) and that it includes

&$db_key=$rec{$db_key}

Lemme know what happens. Smile

------------------
JPD





Quote Reply
Re: "Email This" Option In reply to
Hi JPD !
Hmmm.... strange thing !
1) Indeed, I DO NOT have a field that says

<input type="hidden" name="ID" value="$db_key">

I only have the following :

<form action="$db_script_url" method="POST" name="form1">
<input type=hidden name="db" value="$db_setup">
<input type=hidden name="uid" value="$db_uid">
<input type=hidden name="$db_key" value="$rec{$db_key}">

I HAVE ADDED THAT INPUT, TRIED IT BUT IT IS STILL TELLING ME : "There were problems with sending your email message: No record was returned from the search "

2)The send_record_form is within the sub html_record (at the end) and says :

print qq|
<a href="$db_script_link_url&send_record_form=1&$db_key=$rec{$db_key}">Email this recipe to a friend</a>
|;

Seems to be the right syntax, right ?

Thanks,

Luke

[This message has been edited by lukebrenner (edited March 26, 2000).]
Quote Reply
Re: "Email This" Option In reply to
Luke:

As you can see it's adding html coding to your link <B> </B>.

This will cause the link not to work. I could be wrong but I think that having bold turned on for search results will cause problems in some cases.

In your cfg file:

# Bold search results (1 = Yes, 0 = No).
$db_bold = 0;

Change this setting to 0. You can also specifically use bold for certain sections of your html records.

Hope this solves your problem Smile
Quote Reply
Re: "Email This" Option In reply to
What I said and what you said are the same thing. Smile I was translating the $db_key variable as it should be on the actual html form. (You did say that your $db_key field is 'ID', right?)

Understand that debugging is a long, slow, arduous task. We need to take one thing at a time.

We now know that, for some reason, the record isn't being found.

I need you to alter the "No record was returned from the search" message to see if the key value is being sent. Change

Code:
$message = "No record was returned from the search";

to

Code:
$message = "No record was returned from the search for --$in{$db_key}--";

See if there is a value between the dashes.


------------------
JPD





Quote Reply
Re: "Email This" Option In reply to
JPD, thanks infinitely for your patience. You know, if we can't solve it, the heck with it ! I really do not want to take up so much of your precious time ...

Brrrrr ... I did exactly what you said and I got the following error :

There were problems with sending your email message: No record was returned from the search for ----

So there is no value between the dashes. I re-checked my default.cfg and the $db_key is indeed set for 'ID'

You know, after I do the search and the respective record comes up, just below of the record table I have that link : E-mail this recipe to a friend". Here's the link when I put the cursor over it :

http://www................../dbman/db.cgi?db=default&uid=admin.95418050885459&send_record_form=1&ID=<B>0023</B>

** In this case I searched for the record with the ID 0023.


Luke
Quote Reply
Re: "Email This" Option In reply to
THE HECK !
That was it ! It wooooorks !

I still have a last question though :
Let's say in the "recipient's email address:" I type an invalid e-mail address. Will the sendmail program send me an error message at the address specified in "your e-mail address" or should it be defined as a "return address" in the db.cgi file ?

Thanks guys, thanks a lot to all of you who helped me so much. May your effort be rewarded !

Thanks again,

Luke

[This message has been edited by lukebrenner (edited March 27, 2000).]
Quote Reply
Re: "Email This" Option In reply to
Thanks, Lois for seeing that. I should have asked long before to see the URL generated by the link. Smile

I don't know if you'll get a return message back or not if you enter a wrong email address. The message may just go out into the ozone. Give it a try.


------------------
JPD





Quote Reply
Re: "Email This" Option In reply to
Hi JPD,
you won't believe it but during the time we tried to find out the cause of the blank variables, I SAW that <B>...</B> and even asked nyself for a second why does it appear there. But ... didn't think to turn the bold feature off.

Yes, I tried to enter an invalid (incomplete) e-mail address and indeed, it went into the O-Zone ...
I think though that it has to be a parameter used with sendmail. I'm gonna check out the manual for sendmail.

Luke

****************************************
Update : so I tried it and it didn't come back AT THE ADDRESS SPECIFIED IN SENDER.

I did GOT AN NON-DELIVERY message though, but in my Unix shell, when I use pine.
Seems normal to me ...

Luke

[This message has been edited by lukebrenner (edited March 28, 2000).]
Quote Reply
Re: "Email This" Option In reply to
i get internal server error as soon as i make changes to db.cgi
i have modified the html.pl and the default.cfg when i edit the cgi file i get that error..
any suggestions?

thanks

Quote Reply
Re: "Email This" Option In reply to
Oh, there could be a number of possibilities. One could be that you put the elsif lines in the wrong place. (That seems to be a common error.)

I would have to see your file to know for sure. Copy your db.cgi file to a web-accessible directory (one where you would place .html files) and rename it to db_cgi.txt. Then come back here and tell me where I can pick it up.


JPD
http://www.jpdeni.com/dbman/
Quote Reply
Re: "Email This" Option In reply to
i finally got it working i got a new text editor and did it using that one. when i did it with notepad it addedd extra characters to end of lines i think that was the problem coz the notepad edited is about 500 bytes longer.
anyways my other question is ..is it possible to send the email in HTML format?
thanks for your help


Quote Reply
Re: "Email This" Option In reply to
It probably is possible to send the email in html format. I think you just need to add html codes.

However, understand that not everyone uses mail readers that can read html format. I have gone back to using Pine to read my email. I find it extremely annoying to get email which is in html format and usually I delete it without reading it.


JPD
http://www.jpdeni.com/dbman/
Quote Reply
Re: "Email This" Option In reply to
I have to agree with JPDeni about receiving HTML coding in email. I do the same and delete the messages without reading them, and encourage people to NOT send me messages with HTML coding.

But that's besides the point Smile

There is a mod written to send HTML email. It's called "Forward_record_with images" and can be found in the DBMan rescource center.

Unoffical DBMan FAQ
http://webmagic.hypermart.net/dbman/
Quote Reply
Re: "Email This" Option In reply to
I don't find it in the Resource Center.


JPD
http://www.jpdeni.com/dbman/
Quote Reply
Re: "Email This" Option In reply to
Opps I must have had it in my notes, sorry about that.

The url is:

http://www.fastcom.uk.com/dbman/forward_record_withimages.txt

The forum reference is: 84137
Topic: emailthis mod....wanna push it further..

Hope this helps

Unoffical DBMan FAQ
http://webmagic.hypermart.net/dbman/