<?php

//include 'http://localhost/ams/extentions/tcpdf/pdf/cotizacion-pdf-attachment.php?idCotiMaster=14';//LOCAL
include 'http://apise.com.mx/apise-os/extentions/tcpdf/pdf/cotizacion-pdf-attachment.php?idCotiMaster=14';//WEB
$archivo = "http://apise.com.mx/apise-os/extentions/attachments/APISE-Cotizacion.pdf";
require "src/class.phpmailer.php";
  $mail­ =  new PHPMailer();
  try {
                          $mail­->isSMTP();
                          //Server settings
                          $mail­->SMTPDebug = 2;                                 // Enable verbose debug output
                                                        // Set mailer to use SMTP
                          /*$mail­->Host = 'asimx.com;mail.asimx.com';  // Specify main and backup SMTP servers
                          $mail­->SMTPAuth = true;                               // Enable SMTP authentication
                          $mail­->Username = 'desarrollo@asimx.com';                 // SMTP username
                          $mail­->Password = 'asimxCom8539&';                           // SMTP password
                          $mail­->SMTPSecure = 'ssl';                            // Enable TLS encryption, `ssl` also accepted
                          $mail­->Port = 465;                                    // TCP port to connect to

                          //Recipients
                          $mail­->setFrom('desarrollo@asimx.com', 'Asimex');*/
                          $mail­->Host = 'apise.com.mx;mail.apise.com.mx';  // Specify main and backup SMTP servers
                          $mail­->SMTPAuth = true;                               // Enable SMTP authentication
                          $mail­->Username = 'jrios@apise.com.mx';                 // SMTP username
                          $mail­->Password = 'Rwe3xws1324';                           // SMTP password
                          //$mail­->SMTPSecure = 'ssl';                            // Enable TLS encryption, `ssl` also accepted
                          $mail­->Port = 2525;                                    // TCP port to connect to

                          //Recipients
                          $mail­->setFrom('jrios@apise.com.mx', 'Apise');

                          $mail­->addAddress('jrios@apise.com.mx', 'Apise');     // Add a recipient
                          //$mail->addAddress('juventusluis@hotmail.com');               // Name is optional
                          //$mail->addReplyTo('info@brasmexinv.com', 'Estado de Cuenta Creado');
                      //    $mail->addCC('info@brasmexinv.com', 'Estado de Cuenta Creado');
                          //$mail->addBCC('juventusluis@hotmail.com');

                          //Attachments
                          //$mail->addAttachment($archivo);         // Add attachments
                          //$mail->AddAttachment($_FILES['../attachments/APISE-Cotizacion.pdf']['tmp_name'], $_FILES['../attachments/APISE-Cotizacion.pdf']['name']);
                          //$mail->addAttachment('../attachments/APISE-Cotizacion.pdf','APISE-Cotizacion.pdf');

                          //Content
                          $mail­->isHTML(true);                                  // Set email format to HTML
                          $mail­->Subject = 'Estado de Cuenta Mensual';
                          $mail­->Body    = '<tbody>
                            <tr>
                              <td align="center" valign="top"><table width="650" border="0" align="center" cellpadding="0" cellspacing="0">
                                <tbody>
                                <tr>
                                  <td align="left" valign="top">
                                  <a class="navbar-brand" href="index.html">
                                                  <img src="http://brasmexinv.com/Sitio/img/icons/logo.png" alt="Brasmex">
                                              </a>
                                  </td>
                                </tr>
                                <tr>
                                  <td align="left" valign="top">&nbsp;</td>
                                </tr>
                                  <tr>
                                    <td align="left" valign="top" style="font-size: 40px; color: #00bcf2; font-family: Arial, sans-serif,Helvetica; padding-left: 10px;">Hola!</td>
                                  </tr>
                                  <tr>
                                    <td align="left" valign="top" style="font-size: 18px; color: #57585b; font-family: Arial, sans-serif, Helvetica; padding-left: 10px; padding-top: 3px;">En el archivo adjunto podras encontrar tu estado de cuenta correspondiente al mes  del .</td>
                                  </tr>
                                  <tr>
                                    <td align="left" valign="top">&nbsp;</td>
                                  </tr>
                                  <tr>
                                    <td align="left" valign="top"><img src="http://brasmexinv.com/Sitio/img/Decred_1.original.jpg" alt="" width="650" height="350" style="display:block;" border="0" align="top"/></td>
                                  </tr>
                                  <tr>
                                    <td height="25" align="left" valign="top">&nbsp;</td>
                                  </tr>

                                  <tr>
                                    <td height="40" align="left" valign="top">&nbsp;</td>
                                  </tr>

                                  <tr>
                                    <td height="23" align="left" valign="top" style="border-bottom: 1px solid #58585a;">&nbsp;</td>
                                  </tr>
                                  <tr>
                                    <td height="23" align="center" valign="top">&nbsp;</td>
                                  </tr>
                                  <tr>
                                    <td align="center" valign="top">&nbsp;</td>
                                  </tr>
                                      <tr>
                                    <td align="center" valign="top"><table width="640" border="0" align="center" cellpadding="0" cellspacing="0">
                                      <tbody>
                                        <tr>
                                          <td align="left" valign="top">&nbsp;</td>
                                        </tr>
                                        <tr>
                                          <td align="center" valign="top"><table width="159" border="0" align="center" cellpadding="0" cellspacing="0">
                                            <tbody>
                                              <tr>
                                                <td align="center" style="font-size:9px; color:#5a5758; font-family:Arial, sans-serif, Helvetica;">VIS&Iacute;TANOS EN</td>
                                              </tr>
                                              <tr>
                                                <td height="10" align="center"></td>
                                              </tr>
                                              <tr>
                                                <td align="center">
                                                  <table width="159" border="0" align="center" cellpadding="0" cellspacing="0">
                                                    <tbody>
                                                      <tr>
                                                        <td align="left" valign="top"><a iid="5" href="http://brasmexinv.com" target="_blank"><img src="http://cdn.mittum.com/mx/22277/facebook.jpg" width="33" height="17" style="display:block;" title="facebook.com/citibanamex" border="0" align="top"/></a></td>
                                                        <td align="left" valign="top"><a iid="6" href="http://brasmexinv.com" target="_blank"><img src="http://cdn.mittum.com/mx/22277/twitter.jpg" width="45" height="17" style="display:block;" title="@citibanamex" border="0" align="top"/></a></td>
                                                        <td align="left" valign="top"><a iid="7" href="http://brasmexinv.com" target="_blank"><img src="http://cdn.mittum.com/mx/22277/youtube.jpg" width="49" height="17" style="display:block;" title="youtube.com/citibanamex" border="0" align="top"/></a></td>
                                                        <td align="left" valign="top"><a iid="8" href="http://brasmexinv.com" target="_blank"><img src="http://cdn.mittum.com/mx/22277/linkedin.jpg" width="32" height="17" style="display:block;" title="linkedin.com/company/citibanamex" border="0" align="top"/></a></td>
                                                      </tr>
                                                    </tbody>
                                                  </table>
                                                </td>
                                              </tr>
                                            </tbody>
                                          </table></td>
                                        </tr>

                                      </tbody>
                                    </table></td>
                                  </tr>
                                </tbody>
                              </table></td>
                            </tr>
                          </tbody>';
                          $mail­->AltBody = 'Estado de Cuenta ¡BRASMEXINV.COM!';

                          $mail­->send();
                          echo 'Message has been sent';
                      } catch (Exception $e) {
                          echo 'Message could not be sent. Mailer Error: ', $mail­->ErrorInfo;
                      }
 ?>
