\r\n"; $mailheader1 .= "Bcc: <".$ema2.">\r\n"; $mailheader1 .= "Reply-To: ".$ema1."\r\n"; $mailheader1 .= 'MIME-Version: 1.0'."\r\n"; $mailheader1 .= "Content-type: text/html; charset=iso-8859-1\r\n"; $MESSAGE_BODY1 = '
dkminc.com
phone-icon 213.688.1010

13191 Crossroads Parkway N. Suite 495

City of Industry, CA, 91746

Hi '.$_POST['firstname'].',

Your Free Consultation Has Been Scheduled for '.$_POST['custentitypreferreddate'].' at '.$_POST['custentitypreferredtime'].'. If You Have Questions Before We Meet or Would like to Change the Date and Time Our Consultation, Please Call me at 213.452.8230.

Feel free to Invite Your Colleagues to Join the Discussion.

To greater success,

Ganesh

Partner, GRTECH Inc.

Facebook linkedin Twitter
 
'; mail($ResEmail, $EmailSubject1, $MESSAGE_BODY1, $mailheader1); //set POST variables //$url = 'https://forms.na3.netsuite.com/app/site/crm/externalleadpage.nl'; //url-ify the data for the POST foreach($_POST as $key=>$value) { $fields_string .= $key.'='.$value.'&'; } //rtrim($fields_string, '&'); rtrim($fields_string, '&'); //echo $fields_string; //exit(); //open connection $ch = curl_init(); //set the url, number of POST vars, POST data curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HEADER, 1); //curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_VERBOSE, 1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_FRESH_CONNECT, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLINFO_HEADER_OUT, 1); curl_setopt($ch,CURLOPT_POSTFIELDS, $fields_string); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST'); $response = curl_exec($ch); $info = curl_getinfo($ch); //print_r($info); curl_close($ch); // header('Location:'.$info['url']); if($info['url'] != '' && (strpos($info['url'], 'dkminc.com') !== false)) { $leadsub = "NetSuite Lead Submitted"; $leadmsgcolor = '#00ff00'; } else { $leadsub = "Warning - NetSuite Lead Submission Not Working"; $leadmsgcolor = '#FF0000'; } $fname = $_POST['firstname']; $lname = $_POST['lastname']; $email = $_POST['email']; $schdate = $_POST['custentitypreferreddate']; $schtime = $_POST['custentitypreferredtime']; $leademail = "info@grtechnologyinc.com"; $templname = 'Schedule a Consultation - Salesforce Sales Cloud Demo'; $EmailSubject2 ="NetSuite Lead Copy - ".$templname; $ResEmai2 = $ema1; $mailheader2 = "From: Ganesh <".$leademail.">\r\n"; $mailheader2 .= "Bcc: <".$ema2.">\r\n"; $mailheader2 .= "Reply-To: ".$ema1."\r\n"; $mailheader2 .= 'MIME-Version: 1.0'."\r\n"; $mailheader2 .= "Content-type: text/html; charset=iso-8859-1\r\n"; $MESSAGE_BODY2 = '
'; $MESSAGE_BODY2 .= "

New Lead from $templname Form

First Name $fname
Last Name $lname
Email $email
Preferred Date $schdate
Preferred Time $schtime
Lead Submission Status $leadsub
"; $MESSAGE_BODY2 .= ""; mail($ResEmai2, $EmailSubject2, $MESSAGE_BODY2, $mailheader2); header('Location:https://www.dkminc.com/thank-you/salesforce.html'); } else{ header('Location: https://www.dkminc.com'); } ?>