<?php
    /*$arrContextOptions=array(
        "ssl"=>array(
            "verify_peer"=>false,
            "verify_peer_name"=>false,
        ),
    );

    $myPublicIP = '101.0.64.0';

    $url = 'https://api.ipgeolocation.io/ipgeo?apiKey=da911defdb1649698e0d6e79551899cb&ip='.$myPublicIP;

    $locationArr = json_decode(file_get_contents($url, false, stream_context_create($arrContextOptions)),TRUE);

    $returnArr = [];
    if(!empty($locationArr)){

        $returnArr['country_code'] = $locationArr['calling_code'];
        $returnArr['country_name'] = $locationArr['country_name'];
        $returnArr['city'] = $locationArr['city'];

        echo "<pre>";print_r($returnArr);
    }*/
?>


<?php
    // Include the PHPMailer library
    use PHPMailer\PHPMailer\PHPMailer;
    use PHPMailer\PHPMailer\SMTP;
    use PHPMailer\PHPMailer\Exception;

    //Load Composer's autoloader
    require 'vendor/autoload.php';

    // Create a new PHPMailer instance
    $mail = new PHPMailer(true);

    // Set the SMTP server details for Outlook 365
    $mail->isSMTP();
    $mail->Host = 'smtp.office365.com';
    $mail->Port = 587;
    $mail->SMTPSecure = 'tls'; // Enable TLS encryption
    $mail->SMTPAuth = true; // Enable SMTP authentication
    
    $mail->SMTPOptions = array(
	    'ssl' => array(
	        'verify_peer' => false,
	        'verify_peer_name' => false,
	        'allow_self_signed' => true
	    )
	);

    // Set your Outlook 365 account credentials
    $mail->Username = 'office@techfabindia.com';
    $mail->Password = 'dbtzqjvkllnrdpgp';

    // Set the "From" and "From Name" headers
    $mail->setFrom('office@techfabindia.com', 'TFI');

    // Add a recipient
    $mail->addAddress('sanket@hepta.me', 'Sanket Kumbhar');

    $mail->SMTPDebug = 3;

    // Set the subject and body of the email
    $mail->Subject = 'Test Email';
    $mail->Body = 'This is a test email sent via PHPMailer for testing.';

    // Send the email
    if ($mail->send()) {
        echo 'Email sent successfully!';
    } else {
        echo 'Email could not be sent. Error: ' . $mail->ErrorInfo;
    }


?>


<?php
    /*// Account details
    $apiKey = urlencode('MzA0MjQ1NTc0Njc2MzUzMjQ5NGQ0MjQzNGQ2NzZhNTE=');

    // Prepare data for POST request
    $data = $apiKey;

    // Send the GET request with cURL
    $ch = curl_init('https://api.textlocal.in/balance/?' . $data);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    $response = curl_exec($ch);
    curl_close($ch);

    // Process your response here
    print_r($response);*/
?>



<!--  -->