Gossamer Forum
Home : Products : DBMan : Customization :

Email notification

Quote Reply
Email notification
Hi Guys,

I have placed the general sendmail mod into the cfg and html files as follows:

default.cfg:
$mailprog = "|/usr/lib/sendmail -t -n";
$admin_email = "my\@server.com";

html.pl at end of html_add_success:

open (MAIL, "|$mailprog") | | print "Can't start mail program";
print MAIL "To: $admin_email\n";
print MAIL "From: $admin_email\n";
print MAIL "Subject: my subject\n";
print MAIL "my message ..\n\n";
close MAIL;

For the first 3-4 additions the mail arrived OK. After that it died. Now the response from the document is too quick for it to be even recognizing the sendmail. I am able to print a test message at the end after the mail routine so it seems to be getting there. The sendmail is working fine when using the form processor script so it doesn't seem to be the sendmail. I checked the from processor script and it is much the same as the mod listed above.

Any suggestions will be appreciated
Thanks in advance.
Greg

Quote Reply
Re: Email notification In reply to
I hope one of the more technical types will have a suggestion. I certainly don't have any. Sorry.


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





Quote Reply
Re: Email notification In reply to
Hi JP,

I managed to crook it a bit by excluding the $mailprog variable within html.pl and just putting the direct email add. in. This works Ok, so it must be something in the definition statement in the cfg file thats corrupt.

Really appreciate the help. Thanks
Greg


Quote Reply
Re: Email notification In reply to
I just saw the problem. You have

$mailprog = "|/usr/lib/sendmail -t -n";

and

"|$mailprog"

You need to have the | character only once. Either use

$mailprog = "/usr/lib/sendmail -t -n";

or

"$mailprog"

Sometimes I miss things. Smile

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





Quote Reply
Re: Email notification In reply to
Hi again JP,

Yup that was it. Smile
Thanks again for the prompt response and excellent service you always to seem to come up with. Where you find the time I'll never know. Smile
Greg
Quote Reply
Re: Email notification In reply to
 Smile

I don't have a life outside of DBMan! Smile


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





Quote Reply
Re: Email notification In reply to
Hello Greg

does that mod send a email everytime a user adds a db entry??

Thanks
Quote Reply
Re: Email notification In reply to
Hi There,

Yes it does and it works very well. I reckon I am just about finished with assessing dbman. I have now to setup dbman in 3 different applications, the last is to publish classified ad's. I have now modified the script to display random banner ad's, post a confirmation message with the ad to be published, before it is actually added and then I email the administrator with the ad details just in case some wally posts an ad we would rather not have up. I only allow the default user limited add permissions and the admin obviously has full permissions for editing reasons.
You can check it out at http://www.gardenroute.org.za/classifieds

I am really impressed with the product and support of this forum. I have yet to come across anything as good or as supportive.
JPD is an absolute life saver once you start reading the messages posted to the forum.

Hope it works for you.
Greg
Quote Reply
Re: Email notification In reply to
I have added explicit instructions for sending email via SMTP Mailer and Sendmail in the following thread:

http://www.gossamer-threads.com/...m12/HTML/000636.html

I have configured my script to send an email to the record owner when they add, delete, and modify a record. I am currently working on a Bcc add-on that will send a copy of the message to the administrator.

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 notification In reply to
Gee, it's sure nice to read things about me. Smile

I don't always answer the thanks I get just because I don't want to clutter up the forum. (Maybe I should.) But it's always nice to read. Smile


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





Quote Reply
Re: Email notification In reply to
Hi Again,

I rest my case regards the best support.
Tks to all.
Greg
Quote Reply
Re: Email notification In reply to
I am trying to follow the thread Eliot lists but it is not working. Can anyone help with this:

http://www.gossamer-threads.com/scripts/forum/resources/Forum12/HTML/000636.html

Best regards, Brian

Quote Reply
Re: Email notification In reply to
Brian:

Seems Alex may need to adjust the forum script slightly...
The link would be:

http://gossamer-threads.com/perl/forum/showflat.pl?ubb=000636:Forum12

Instead of going to Forum12 it's going to Form12.

Hope this helps, and please do check the FAQ noted below as the thread referenced may be there in a condensed version of that thread or others regarding using SMTP.

Or there is always the option of search the forums for SMTP and finding all related threads.


Unoffical DBMan FAQ
http://webmagic.hypermart.net/dbman/
Quote Reply
Re: Email notification In reply to
Cheers for that that. Your site is good too Smile. And here is me thinking I should create a list of DBMan tips I have acquired!!

Quote Reply
Re: Email notification In reply to
omegadm:

Hey feel free to send me any notes you may have that are not currently in the FAQ .. all additions are welcome.

I should really have set this up in a database so others could easily add other tips, but was just trying to gather all my notes first and get them somewhat organized Smile



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