Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/xamarin/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 如何将注册信息发送到电子邮件_Html_Ajax - Fatal编程技术网

Html 如何将注册信息发送到电子邮件

Html 如何将注册信息发送到电子邮件,html,ajax,Html,Ajax,我有一个登录页,我想把注册信息直接发送到我的电子邮件中,或者放在excel文件中 // send data to some get post API , if so uncomment next code and customize for your needs $myvars = 'publicid=' . $publicid . '&firstname=' . $firstname . '&lastname=' . $lastname . '&email=' .

我有一个登录页,我想把注册信息直接发送到我的电子邮件中,或者放在excel文件中

// send data to some get post API , if so uncomment next code and customize for your needs 


$myvars = 'publicid=' . $publicid . '&firstname=' . $firstname . '&lastname=' . $lastname . '&email=' . $email . '&phone=' . $phone . '&country=' . $selected_country . '&leadsource=' . $leadsource[0] . '&ip=' . $ip;


$url = "#";
$ch = curl_init( $url );
curl_setopt( $ch, CURLOPT_POST, 1);
curl_setopt( $ch, CURLOPT_POSTFIELDS, $myvars);
curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt( $ch, CURLOPT_HEADER, 0);
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1);

$response = curl_exec( $ch );
 var_dump($response);

echo '{"success":true,"message":{"message":"lead insert"}}';
?>

因此,您需要做stackoverflow中已经要求的两件事,请阅读这两页:

使用您的数据生成excel:

发送带有附件的电子邮件: