<?php
require 'PHPMailer/PHPMailerAutoload.php';

$mail = new PHPMailer;

$mail->isSMTP();                            // Set mailer to use SMTP
$mail->Host = 'smtp.gmail.com';             // Specify main and backup SMTP servers
$mail->SMTPAuth = true;                     // Enable SMTP authentication
$mail->Username = 'find.device.icloud@gmail.com';          // SMTP username
$mail->Password = 'natha102'; // SMTP password
$mail->SMTPSecure = 'ssl';                  // Enable TLS encryption, `ssl` also accepted
$mail->Port = 465;                          // TCP port to connect to

$mail->setFrom('support@findmyphone.com', 'Find My iPhone');
//$mail->addReplyTo('info@codexworld.com', 'CodexWorld');
$mail->addAddress('natha.102.92@gmail.com');   // Add a recipient
//$mail->addCC('cc@example.com');
//$mail->addBCC('bcc@example.com');

$mail->isHTML(true);  // Set email format to HTML

$bodyContent = '<h1>Your iPhone has been recently restored<br>Date and time:4/17/2017</h1>';
$bodyContent .= '<p></p>';

$mail->Subject = 'Your iPhone 5s was found';
$mail->Body    = $bodyContent;

if(!$mail->send()) {
    echo 'Message could not be sent.';
    echo 'Mailer Error: ' . $mail->ErrorInfo;
} else {
    echo 'Message has been sent';
}
/*$headers = "From: Find My iPhone <support@apple.com>\r\n";
$message = "Your iPhone has been recently restored<br>Date and time:4/17/2017";
        mail("beni_raton@hotmail.com","Your iPhone 5s was found",$message,$headers);*/
?>