I'm trying to send email via php mail function like below but it doesn't seem to work on IE. It works on all other browsers. Below is the code. Is there a reason why???
$sent1 = mail($to, $subject, $message, $headers);
$sent2 = mail($clientTo, $clientSubject, $clientMessage, $clientHeaders);
if ($sent1 && $sent2){
$ch = curl_init("https://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "oid=$sf_oid&first_name=$sf_first_name&last_name=$sf_last_name&company=$sf_company&phone=$sf_phone&email=$sf_email&URL=$sf_website&descr开发者_Go百科iption=$sf_description&lead_source=$sf_leadsource");
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_exec($ch);
$info = curl_getinfo($ch);
if($_SERVER['REMOTE_ADDR'] == "124.254.75.167")
//print_r($info);
curl_close($ch);
$ch = curl_init("http://www.rankreport.com.au/ajax/add_new_lead");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "lead_company_id=1&lead_business=1234&lead_first_name=asdf&lead_website=12314.com&lead_phone=1234&lead_email=test@test.com&lead_package=seo");
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_exec($ch);
curl_close($ch);
echo '3';
}
PHP has nothing to do with browser (PHP is server-side executable), so it isn't browser's problem. You have probably no $sent1
, $sent2
defined
精彩评论