Jane - here is my List Page: Before Process code, I am still not sure what to change inorder to send the information to the default email client...
Thanks!!
if(@$_REQUEST["a"]=="email")
{
if(@$_REQUEST["selection"])
{
$body="";
foreach(@$_REQUEST["selection"] as $keyblock)
{
$arr=split("&",refine($keyblock));
if(count($arr)<1)
continue;
$keys=array();
$keys["id"]=urldecode(@$arr[0]);
$where = KeyWhere($keys);
//$rs = CustomQuery("select * from bid where $where");
$rs = CustomQuery("
SELECT
company.CompanyName,
bidinfo.JobName,
bidinfo.dateRequired,
bid.dateSent,
bid.emailTo,
company.EmailMain,
bid.faxTo,
company.FaxMain,
company.PhoneMain,
bid.notes,
bid.trade_id,
bid.bidinfo_id,
bid.timberline_id,
trade.id,
trade.Trade,
bidinfo.bidTime,
company.id,
company.timberline_id,
company.Address1,
company.Address2,
company.City,
company.St,
company.Zip,
company.Webpage,
company.EstVen,
company.Notes,
bid.id,
bid.scope,
bid.returnedDate,
trade.timberline_id,
bidinfo.id
FROM
bid
Inner Join bidinfo ON bid.bidinfo_id = bidinfo.id
Inner Join company ON bid.timberline_id = company.timberline_id
Inner Join trade ON bid.trade_id = trade.id
where $where");
$data=db_fetch_array($rs);
$body .= " | Bid Id: " . $data['id'] . " | " . "\n";
$body .= " | Company: " . $data['CompanyName'] . " | JobName: " . $data['JobName'] . " | Trade: " . $data['Trade'] . " | " . "\n";
$body .= " | DateRequired: " . $data['dateRequired'] . " | BidTime " . $data['bidTime'] . " | DateSent: " . $data['dateSent'] . " | " . "\n";
$body .= " | EmailTo: " . $data['emailedTo'] . " | Email Address: " . $data['EmailMain'] . " | " . "\n";
$body .= " | FaxTo: " . $data['faxTo'] . " | Fax # " . $data['FaxMain'] . " | " . "\n";
$body .= " | Phone # " . $data['PhoneMain'] . " | Notes: " . $data['notes'] . " | " . "\n";
$body .= "\n-------------------------------------------------------------------------------------------------------------------------------------------------\n\n";
}
// send the email
$email="xxxxxx@gmail.com";
$subject="Construction Bid Information";
$arr = runner_mail(array('to' => $email, 'subject' => $subject, 'body' => $body));
// if error happened print a message on the web page
if (!$arr["mailed"])
{
echo "Error happened:
";
echo "File: " . $arr["errors"][0]["file"] . "
";
echo "Line: " . $arr["errors"][0]["line"] . "
";
echo "Description: " . $arr["errors"][0]["description"] . "
";
}
}
}