Gossamer Forum
Home : Products : DBMan : Installation :

Private Mailer Mod

Quote Reply
Private Mailer Mod
I've searched the forum on sendmail, played with syntax prob 50 times ... need help!

Working w/the private mailer mod. I've managed to get my form right at my "draft" http://www.flash.net/cgi-bin/cgiwrap/murgnam/Directory/db.pl site. Even "supposedly" sends the email (test to myself). Unfortunately, I (the test recipient) don't receive the email. Gotta be something to do with the absolute/relative/whatever path to send mail ... err I'm guessing that's what it is, :-0.

FlashNet tells me the location of sendmail is "/usr/lib/sendmail". The Mod refers to "|/usr/lib/sendmail -t -oeq";. Where the |, -t and -oeq come in I don't know, :-0.

My default.txt is @ http://www.flash.net/~murgnam/default.txt .

I could use $mailprog = "/usr/lib/sendmail"; "|/usr/lib/sendmail -t -oeq"; $mailprog = "http://www.flash.net/cgi-bin/cgiwrap/murgnam/Directory/usr/lib/sendmail"; $mailprog = "/cgi-bin/cgiwrap/murgnam/usr/lib/sendmail";

I'm confused as H***. Heeellllpppp. Please. :-).



Mod
Quote Reply
Re: Private Mailer Mod In reply to
The proper setup for the variable ($mailprog) is the following:

Code:
$mailprog = "|/usr/lib/sendmail -t -oeq";

Your default.cfg file seems to be configured correctly. The problem probably exists in your html sub-routines in the html.pl file or your private email routines in your db.pl file. Also, since you are able to receive email with the test you ran, it is not a sendmail problem, most likely the way you have configured these sub-routines.

Please save your html.pl and db.pl files as text files, like html.txt and db.txt, and save the files in a publicly accessible directory on your server.

Then post the URLs where we can view these files.

Thank you.

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

[This message has been edited by Eliot (edited September 27, 1999).]
Quote Reply
Re: Private Mailer Mod In reply to
default.txt, html.txt and db.txt uploaded to http://www.flash.net/~murgnam/

Nuther tidbit tho'. When I talked about my test, it was that it "appeared" to go somewhere, e.g., the mod appeared to have worked giving me the your email message was sent ... but it's the where in cyberspace it went that's the issue ... I haven't recv'd a response as a result of yet, :-0
Quote Reply
Re: Private Mailer Mod In reply to
default.txt, html.txt and db.txt uploaded to http://www.flash.net/~murgnam/

Nuther tidbit tho'. When I talked about my test, it was that it "appeared" to go somewhere, e.g., the mod appeared to have worked giving me the your email message was sent ... but it's the where in cyberspace it went that's the issue ... I haven't recv'd a response as a result of yet, :-0
Quote Reply
Re: Private Mailer Mod In reply to
Okay...now I understand. I was confused about the "test" you said you ran. It would seem that the problem could be with your sendmail configurations.

Have you tried taking out the -t oeq and just use your sendmail path?

If not, have you tried putting the sendmail path in the db.cgi file by replacing the $mailprog variable?

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: Private Mailer Mod In reply to
1. If I take out the -t oeq - no go.
2. If I further take out the | (pipe?) - it "appears" to work, 'cept I still don't receive my test email result.

To the db.pl file, not real sure what you mean ... should I edit something in the below?

(MAIL, "$mailprog") | | &cgierr("unable to open mail program");
print MAIL "To: $rec{$db_email_field}\n";
print MAIL "From: $in{'email'}\n";
print MAIL "Subject: $in{'subject'}\n\n";
print MAIL "-" x 75 . "\n\n";
print MAIL $in{'emailmessage'};
close (MAIL);
&html_send_email_success;

Over

JR
Quote Reply
Re: Private Mailer Mod In reply to
Ah...I see a problem with the sub send_email routine. I don't know why I didn't catch it sooner.

You need to change the following variable:

Code:
$rec{$db_email_field}

with the following:

Code:
$rec{'Email Address(es)'}

However, I see a problem with this...Are you allowing people to input multiple email addresses? That is the problem right there!

Using multiple recipient email address with sendmail or SMTP via cgi/perl scripts does not work. You can only send to one recipient per form.

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: Private Mailer Mod In reply to
ewwwww, ahhhhh, VOILA!!!

Deleted 2 of my 3 email addresses and VOILA! Woohoo!

Alas, guess I've got some admin/dbman update news to pass to my alumni tho', :-0. But I think the result of the private -v- the mailto makes it all worth the effort.

THANKS AGAIN ELIOT, :-))

JR
Quote Reply
Re: Private Mailer Mod In reply to
Good. Glad that it worked. The best thing to do is keep only one email address per user.

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: Private Mailer Mod In reply to
Since the above, I've changed to the Short/Long Display. Ever'thin seemed fine, 'til I tried to send an email.

I went back to the Mod instructions, found ever'thin fine, 'cept the

<a href="$db_script_link_url&$db_key=$rec{$db_key}&send_email_form=1">Send email to this person</a>

was missin'. I tried to put it back in sub html_record (close to the end), but ever'time I'd get a 500 error after uploading. Take the above out, program works fine, 'cept the private mailer.

Is there an exact place within sub html_record? Do I need the link within a print statment?

I've uploaded html_pl.txt to http://www.flash.net/~murgnam/

Any clues, would be appreciated. Thx.

JR
Quote Reply
Re: Private Mailer Mod In reply to
You can put the codes in sub html_record_long. The problem most likely is attributed to missing brackets if you are using comparisions, like if there is an email, then print the link.

I would check the codes again and if you are still experiencing difficulties, please save your html.pl file as a text file and post the URL where we can view the file.

Thanks.

Hope this helps.

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: Private Mailer Mod In reply to
Looks like you got it fixed. The html.pl file has no syntax errors and the link to the mailer seems to be working just fine.


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





Quote Reply
Re: Private Mailer Mod In reply to
Eliot/JPD,

Below is in my sub_html_record_long. But, when I go to send an email I get ...

Fill in your email address, the subject of your email and the message you wish to send to .

After the to should be the First Name (Nickname) & Spouses Name, right? I tried to send an email last night to a fellow alumni, but no, go, e.g., why I'm bumfuzzled -- all my coding seems to be right, :-0.

<TR><TD>Email (only one address please):</TD>
<TD>Send email to <a href="$db_script_link_url&$db_key=$rec{$db_key}&send_email_form=1">$rec{'First Name (Nickname) & Spouses Name'}</a></TD></TR>

Again, my html_pl.txt is @ http://www.flash.net/~murgnam/html_pl.txt

Over

JR
Quote Reply
Re: Private Mailer Mod In reply to
The problem is not in your html.pl file. Did you copy the codes exactly as they were written in the mod??? I would recommend re-copying the sub send_email from JPDeni's mod page and then overwrite the codes you currently have.

If this does not work, please save your db.cgi file as a text file and upload it to your server. Then let us know where it is located.

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: Private Mailer Mod In reply to
I figured out the problem. It only comes when you do a "List All" before using the private mailer. Try doing a search for first name Joe and the mailer will work fine.

But there's a fix for this. (I'm really glad you mentioned the problem. I hadn't realized it until now.)

In html.pl, sub html_send_email_form, after

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

add

Code:
$in{$db_key} =~ s/<?.B>//g;

The problem is that there are bold tags which are preventing the search from being successful. The code above will delete the bold tags and you should be fine.

Now off to edit the mod file!


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





Quote Reply
Re: Private Mailer Mod In reply to
Eliot/JPD,

1. I'd changed my sub send_email based on our previous conversations above e.g.,

You need to change the following variable:


code:
--------------------------------------------------------------------------------

$rec{$db_email_field}

--------------------------------------------------------------------------------

with the following:


code:
--------------------------------------------------------------------------------

$rec{'Email Address(es)'}

That said, when I changed it back "exactly" it worked ... least if I sent the private email via "View" -v- "ListAll".

2. The

In html.pl, sub html_send_email_form, after

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

add


code:
--------------------------------------------------------------------------------

$in{$db_key} =~ s/<?.B>//g;

--------------------------------------------------------------------------------

seemed to fix all my worries tho'

Thx again u2, :-))