Gossamer Forum
Home : Products : DBMan : Customization :

Email form results to site admin, and add record to db...

Quote Reply
Email form results to site admin, and add record to db...
Right now, I have an application form html using a slightly-modified version of Matt's Formmail.cgi. (modified to send the email to 2 separate addresses) To get the info into the database, at this point the admin (me) would have to take the email data, and add the record to the database manually....

This adds too much time to the equation, since I would like the info to appear in the db right after they submit the application.... But I don't want to lose the formmail.cgi functionality....

Is there any way these 2 great scripts can be combined? Anyone managed to do it?
Please help! Smile
Quote Reply
Re: Email form results to site admin, and add record to db... In reply to
Yes...I use many different kinds of sendmail functions (also some connected via SMTP) in various DBMAN projects I maintain.

You can use parts of the Formmail.cgi file for setting up sendmail routines in DBMAN. DBMAN is a nice program for securely inputting data into a database file.

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: Email form results to site admin, and add record to db... In reply to
This kind of makes it tricky.....
I use my own form for the application....
And I need it to redirect to my own "application sent" page.....
Even though I know it's possible to customize dbman's "record added" page

Guess I just gotta sit down and figure it all out...... and learn a bit of Perl while I'm at it... heheh
Quote Reply
Re: Email form results to site admin, and add record to db... In reply to
There should be a way that you can modify the formmail script to write to the .db file. I would have to look at the other script to give you the code to do it, though.


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





Quote Reply
Re: Email form results to site admin, and add record to db... In reply to
Could you make the formmail script available on your website? Copy it to a web-accessible directory -- one where you would place html files -- and rename it so it has a .txt extension. I'll take a look at it and see if I can find where to put the code.

I'm assuming that the formmail script is in the same directory as DBMan.


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





Quote Reply
Re: Email form results to site admin, and add record to db... In reply to
Formmail can write to a flatfile! It is available at:
http://www.infosheet.com/download_stuff.html
This is a formmail hack that I used once. It works great.

Just make sure you keep the db file in a protected directory, this script has zero security.
Quote Reply
Re: Email form results to site admin, and add record to db... In reply to
I'm sure there'd be a way for it to call upon dbman's add record routine or something..... (or even just cut/paste'ing the addrecord code over to a proc in formmail.cgi........) With my current knowledge of Perl, that would take a long time for me to do... heheheh.



Quote Reply
Re: Email form results to site admin, and add record to db... In reply to
well, I tried to download it, but the download form/cgi doesn't seem to want to work....
Quote Reply
Re: Email form results to site admin, and add record to db... In reply to
I am still confused why you want an email form to add data into DBMAN database file. If you are concerned about validating data before it is added into the "live" searchable database...There are mods available that will allow you the Administrator to validate or delete them.

It just seems odd to expend a lot of energy into an email form when you can have users access DBMAN directly and add, modify, and delete their records.

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 form results to site admin, and add record to db... In reply to
Hey, I am not quite sure what the heck you are doing, but I am working on a mod that will have dbman use sendmail.pm to give users a chance to email me orders/request info.
I also have a nifty little program "mailto.pl" that sends a confirmation email to them, a special email to me, and a log of that emil to a database and then it strips out the sender's email address and writes it to another db with just emails.

I have it just about done, and will share the info once it is. I have one last hang up with the mod. It seems that when theform sends it's info to the mailto.pl script, instead of running the mailto.pl script it goes to a download screen. I have no clue why it does that. But once I get that one figured out I will give the mod to whoever wants it.

Hey, if you know what the heck is wrong, give me a clue!!! Smile



------------------
http://www.antiqueexchange.net
Quote Reply
Re: Email form results to site admin, and add record to db... In reply to
Here's "why".....

The form in question is an application form for an irc bot service on the Undernet. We need the email to be sent to me and the admins mailing list.....
I am also trying to use dbman for a searchable public database of channels for our bot service. We have 3 "status" options.... "Incoming", "Accepted", and "Rejected", which is held in a listbox field in the database.
We need to have the application form send the emails, *and* add the record to the database, otherwise the "Incoming" option is useless, since by the time we'd get around to adding the record as "Incoming" ourselves, we'd have reviewed the application and decided on Accepting it or Rejecting it, making the "Incoming" option useless.
And if the only options we had are "Accepted" and "Rejected", I might as well just toss dbman into the bitbucket and just maintain standard html files....

The only way this system (our desired system anyway) would work is to have the record added at the time the application is submitted. (Having cgi lookups for hte channels looks cool too...)

Quote Reply
Re: Email form results to site admin, and add record to db... In reply to
(Adding another cook to the broth! Smile )

I think the "why" question is more of "why do you need to keep using formmail?" DBMan is capable of sending out as many emails as you want to whomever you want.



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





Quote Reply
Re: Email form results to site admin, and add record to db... In reply to
Hmmmm... I don't remember seeing any email options in the docs..... (at least not in the default distribution I got...) I suppose I'll have to go over it again?

From the looks of it, BFormmail looks like a winner......
Quote Reply
Re: Email form results to site admin, and add record to db... In reply to
In the default install of DBMAN 2.04 (is that the current version?), there are no email routines.

But there are tons of email mods that have been implemented. These are some of the email options available:

1) Send administrator email when User adds, deletes, or modifies a record.

2) Send email to Registered Users when they have modified or deleted a record.

3) Send administrator email to validate a record submitted by a Registered User.

4) Send a complete record to a friend.

5) Send a private email message to Record Owner if Record Owner does not want their email address to be publicly posted.

and there are other email mods in the works as well.

So, yes, email has been integrated into DBMAN by many users.

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 form results to site admin, and add record to db... In reply to
HJ,

Some of the email mods are located on JPDeni's DBMAn-ual site, which is located at www.jpdeni.com/dbman/mods.html . There are also some mods located in this forum. Do a search for "SMTP", "Sendmail", etc.

donm,

I assume that you are looking for a mailing list type of mod that will store a database of registered alumni and then send out emails out everytime a new record is added. The better thing to do is download the subscription mail program in LINKS2, which allows people to subscribe to a newsletter type of system that interacts with LINKS2.
I am in the process of looking at how DBMAN can be integrated with this type of subscription mail program.

There are, of course, simpler email mods that you could install. Could you be more specific about what you would like to accomplish?

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 05, 1999).]
Quote Reply
Re: Email form results to site admin, and add record to db... In reply to
Hi Eliot,
I am interested in the e-mail mods you mentioned above but cannot find them at the recource section. Are they available somewhere else. Am specially interested in the Send administrator email to validate a record submitted by a Registered User.

Thanks!

------------------
Henk Jan Buchel
Classic Boatworld
http://classicboatworld.net
Quote Reply
Re: Email form results to site admin, and add record to db... In reply to
This is a wonderful forum ! I have been reading alot of the posts here and there are so many great ideas for DBMan. I have just read this one, especially the one here from Eliot that gives information about sending email to users using DBMan.

I have a question about sending an email. We have an alumni membership DB and it is separated by graduating class year (fieldname: 'Year Graduated'). I am wondering if an email can be sent to those registered alumni when a new record (alumni profile) is added for their specific year?

Dedra
Quote Reply
Re: Email form results to site admin, and add record to db... In reply to
Eliot - what we are hoping to do is send an email to those registered for a specific graduating year each time a new alumnus adds a new record to the database for their year.

For example:

If I registered and I entered into the database that I had graduated in 1982. I would want to receive an email each time someone new entered a record into the database that graduated for my same year (1982). We would want to do this for each class in the database.

We would also want an option for users to turn this on or off.

Is this asking too much? I might have to actually wait for Don to come back to actually implement it if it requires changing alot of code. ;-)

P.S. We also could possibly opt for sending an email to all registered users each time a record is added - provided we could state in the email the name of the user and year graduated.

Thank-you

Dedra

[This message has been edited by Dedra (edited September 05, 1999).]
Quote Reply
Re: Email form results to site admin, and add record to db... In reply to
Debra,

I think it is possible. Yet the mail routines within db.cgi would have to be modified a lot in order to first of all pull email addresses from the database file and then check the graduation year. I was working on a stand alone mailing script that checks two fields in the default.cfg script and sends out routine emails every 30 days. (However, I cannot get it to work.)

The best thing to do would be to wait until donm gets back. There would have to be a lot of codes to add in db.cgi and I don't think you want to chance bringing the database down.

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 form results to site admin, and add record to db... In reply to
Eliot - thank you for your response. I think will wait for Don to get back as I am not very good with this scripting.

Dedra