我正在尝试通过下面的php邮件功能发送电子邮件,但它似乎不适用于IE。它适用于所有其他浏览器。下面是代码。是否有原因???
$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&description=$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';
}
答案 0 :(得分:2)
PHP与浏览器无关(PHP是服务器端可执行文件),因此它不是浏览器的问题。您可能没有$sent1
,$sent2
已定义