ok
Direktori : /home2/selectio/www/thedentalpark.com/apis/ |
Current File : /home2/selectio/www/thedentalpark.com/apis/mail-send-api.php |
<?php include"../config/config.php"; require 'PHPMailer/class.phpmailer.php'; $mail = new PHPMailer(true); $ids =$_POST['ids']; $email =$_POST['email_id']; $customer_indement =$_POST['customer_indement']; try{ if(1==1){ $data['code'] = '200'; $data['email'] = 'put seneted Mail id'; $data['message'] = 'Registartion Compelted'; $postData = array( 'customer_indimation'=>$_POST['customer_indement'], 'email_id'=>$_POST['email_id'], ); //API URL $url = "https://firstmatrix.in.net/tnssa-email-api/test.php"; // init the resource $ch = curl_init(); curl_setopt_array($ch, array( CURLOPT_URL => $url, CURLOPT_RETURNTRANSFER => true, CURLOPT_POST => true, CURLOPT_POSTFIELDS => $postData )); //Ignore SSL certificate verification curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); //get response $output = curl_exec($ch); }else{ $data['code'] = '500'; $data['email'] = 'put seneted Mail id'; $data['message'] = 'Registartion Failed...'; error_log($data['message']); } echo json_encode($data); }catch(Exception $e){ $data['code'] = '500'.$e; $data['email'] = 'put seneted Mail id'; $data['message'] = $e; error_log($e); echo json_encode($data); } // } ?>