BeforeAdd |
12/28/2006 11:11:40 AM |
PHPRunner General questions | |
L
lawfour author
I thought this code worked but it stops at CC: can someone tell me why? |
|
![]() |
Sergey Kornilov admin 12/28/2006 |
Here is the correct way to set additional headers: // Additional headers
|
L
|
lawfour author 12/28/2006 |
Hi |
J
|
Jane 12/29/2006 |
Larry, function BeforeAdd(&$values) { // Parameters: // $values - Array object. // Each field on the Add form represented as 'Field name'-'Field value' pair //** Send email with new data **** $email=$values["Email"]." ,".$values["Email2"]; $message="Airgas Only: http://www.kccesr.org/gpage.html"; $subject="KCC Gas Order"; // Additional headers $headers = 'From: ESR Website <larry@kccesr.org>' . "\r\n"; foreach($values as $field=>$value) $message.= $field." : ".$value."\r\n\n"; mail($email, $subject, $message, $headers); return true; // return true if you like to proceed with adding new record // return false in other case } |