Email Feature

M

Michel

Guest
Hi, really great scripts.... helps a lot and makes my tables much easier to edit and change. one question.. i ve seen the email class and i m wondering for what there are? havent found any info about an addtion email feature at version 1.7...
 
E

Eugenio

Guest
Michel wrote:
>
> Hi, really great scripts.... helps a lot and makes my tables
> much easier to edit and change. one question.. i ve seen the
> email class and i m wondering for what there are? havent
> found any info about an addtion email feature at version 1.7...

You are right, no email feature in this version, the email feature is ready (opps, I'm revealing a secret ;-)) ) but maybe I'll include it later, I want to make it more "general" and easy to admin.

(Latest version of DaDaBIK when this message was posted: 1.7)
 
S

Stan

Guest
Eugenio, forgive me for the following. I had to do this to expedite a project and have posted it elsewhere in these forums. I love your work. It has helped me so much!

Looking forward to the "official" email stuff.

Stan

*~*~*~*~*~*~*

Insert something like the following just above the line that reads:
"} // end function insert_record"
in business_logic.php.


////////////////////////////////////////////////////////////////
// send email notification of record insert execution
////////////////////////////////////////////////////////////////
$message = "First line of your message\nSecond line of your message\n\nhttp://yourhost.com/yourDadabiklink\n\nPlease do not reply to this email.\nIt has been generated automatically by the database interface.\n";
mail("recipient@hishost.com", "New Record Inserted", $message,
"From: <you@yourhost.com>\r\n"
."Reply-To: \"you@yourhost.com\"\r\n"
."X-Mailer: PHP/" . phpversion());
//////////////////////////////////////////////////////////////////////
// end send email notification of record insert execution
//////////////////////////////////////////////////////////////////////


One could do something similar in the record update function block.
 
G

George

Guest
Hi,

Do I gather from this discussion that Dadabik will soon be able to email an alert when an entry is added in the database? This is exactly what I am looking for.

Users request services from my website using a form which is sent to me with a FormMail cgi script. I then have to laboriously type in the record details to the database using a Dadabik interface.

Is there currently a way in which this can be done automatically, i.e. for me to use a modified Dadabik form as the user interface, which both posts an entry to the database AND emails the entire post to me?

If this feature is not yet available built-in to Dadabik, is there a modification I can make to Stan's suggestion:


////////////////////////////////////////////////////////////////
// send email notification of record insert execution
////////////////////////////////////////////////////////////////
$message = "First line of your message\nSecond line of your message\n\nhttp://yourhost.com/yourDadabiklink\n\nPlease do not reply to this email.\nIt has been generated automatically by the database interface.\n";
mail("recipient@hishost.com", "New Record Inserted", $message,
"From: <you@yourhost.com>\r\n"
."Reply-To: \"you@yourhost.com\"\r\n"
."X-Mailer: PHP/" . phpversion());
//////////////////////////////////////////////////////////////////////
// end send email notification of record insert execution
//////////////////////////////////////////////////////////////////////


...which would mail me the WHOLE record (about 20 fields) rather than just a notification. I guess this might be quite easy???

Would love a quick response!

Many thanks,

George
 
G

George

Guest
Hi,

Do I gather from this discussion that Dadabik will soon be able to email an alert when an entry is added in the database? This is exactly what I am looking for.

Users request services from my website using a form which is sent to me with a FormMail cgi script. I then have to laboriously type in those details using a Dadabik interface.

Is there currently a way in which this can be done automatically? i.e. for me to use a modified Dadabik form as the user interface, which both posts an entry to the database AND emails the entire post to me?

If this feature is not yet available built-in to Dadabik, is there a modification I can make to Stan's suggestion:


////////////////////////////////////////////////////////////////
// send email notification of record insert execution
////////////////////////////////////////////////////////////////
$message = "First line of your message\nSecond line of your message\n\nhttp://yourhost.com/yourDadabiklink\n\nPlease do not reply to this email.\nIt has been generated automatically by the database interface.\n";
mail("recipient@hishost.com", "New Record Inserted", $message,
"From: <you@yourhost.com>\r\n"
."Reply-To: \"you@yourhost.com\"\r\n"
."X-Mailer: PHP/" . phpversion());
//////////////////////////////////////////////////////////////////////
// end send email notification of record insert execution
//////////////////////////////////////////////////////////////////////


...which would mail me the whole record rather than just a notification. I guess this might be quite easy???

Would love a quick response!

Many thanks,

George
 
B

Bill

Guest
I was browsing through the business_logic.php file. I noticed numerous email functions with //goal in the remarks. I assume that these are features for later release.

If not how do I access them?

I searched the Forum and ran across posts by Michel, Eugenio, Stan, and George for emailing after a record is added. I took it a step further and added one for deleting a record. They work great. Who ever wrote the script thank you.

Is there any way to add the complete record to the email when it is deleted?

This would be additional safeguard saving lost data to at least an email if the wrong record was deleted.

Thanks
Bill
 
G

Gary

Guest
I made the described change in business_logic.php, but when I try to load the index page, there are these errors:

"Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in <path_to_business_logic.php>business_logic.php on line 257

Fatal error: Call to undefined function: () in <path_to_business_logic.php>business_logic.php on line 56"

I've tried varying the quotation marks and so on but this error always appears. Can I confirm that people are actually successfully using this modification to business_logic.php to have Dadabik send an email notification of an insert? If so, any idea of why I'm getting these errors?

Thanks for any help on this.

Gary
 
Top