Hi all
i have a process where by the information held in a quote table is attached to the customer table by the customer id.
I have a view that joins both of these tables in order that the full quite details be shown.
I would like to email the full quote information from the view when a quote is entered into the quote table.
I think it would go allong the lines of: quote table updated select * from view.
I have the following in the after record added event :
$email="my.address@mydomain.com";
$from="my.system@mydomain.com";
$msg="";
$subject="A new Quote has been added to the system";
foreach($values as $field=>$value)
{
if(!IsBinaryType(GetFieldType($field)))
$msg.= $field." : ".$value."\r\n";
}
$ret=runner_mail(array('to' => $email, 'subject' => $subject, 'body' => $msg, 'from'=>$from));
if(!$ret["mailed"])
echo $ret["message"];
This is enough to send from the database im updating.
Also i would like to be able to email only the person adding the record without having to hardcode a group of users into the event, as people will come and go within the company.
I have usernames and email addresses stored in a users table