email_templates_helper.php 2.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <?php
  2. if (!function_exists("emailInicioProcesoDescarga")) {
  3. function emailInicioProcesoDescarga($fechaInicioProceso, $arrayArchivos)
  4. {
  5. $asunto = "Inicio descarga y proceso de archivos de licitaciones";
  6. $archivosEmail = "";
  7. foreach ($arrayArchivos as $file) {
  8. $archivosEmail .= "<p>" . $file . "</p>";
  9. }
  10. $cuerpo = "<!DOCTYPE html>
  11. <html lang='en'>
  12. <head>
  13. <meta charset='UTF-8'>
  14. </head>
  15. <body style='font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 15px;'>
  16. <div class='contenedor' style='max-width:900px; width:100%; margin:0px auto;'>
  17. <div class='texto-inicio'>
  18. <p><strong>A continuación se mostraran los ficheros implicados en el proceso de descarga a fecha :" . $fechaInicioProceso . ".</strong></p>
  19. </div>
  20. <div class='campos'>
  21. $archivosEmail;
  22. </div>
  23. </div>
  24. </body>
  25. </html>";
  26. enviarEmail($asunto, $cuerpo, array(), false);
  27. }
  28. }
  29. if (!function_exists("emailFinProcesoDescarga")) {
  30. function emailFinProcesoDescarga($fechaInicioProceso)
  31. {
  32. $asunto = "Fin descarga y proceso de archivos de licitaciones";
  33. $cuerpo = "<!DOCTYPE html>
  34. <html lang='en'>
  35. <head>
  36. <meta charset='UTF-8'>
  37. </head>
  38. <body style='font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 15px;'>
  39. <div class='contenedor' style='max-width:900px; width:100%; margin:0px auto;'>
  40. <div class='texto-inicio'>
  41. <p><strongEl proceso de importación con fecha $fechaInicioProceso ha terminado.</strong></p>
  42. </div>
  43. </div>
  44. </body>
  45. </html>";
  46. enviarEmail($asunto, $cuerpo, array(), false);
  47. }
  48. }
  49. if (!function_exists("emailEnvioExcel")) {
  50. function emailEnvioExcel()
  51. {
  52. $asunto = "Envio Excel Licitaciones Dia " . date("d-m-Y");
  53. $cuerpo = "<!DOCTYPE html>
  54. <html lang='en'>
  55. <head>
  56. <meta charset='UTF-8'>
  57. </head>
  58. <body style='font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 15px;'>
  59. <div class='contenedor' style='max-width:900px; width:100%; margin:0px auto;'>
  60. <div class='texto-inicio'>
  61. <p><strong>Se adjunta excel de licitaciones día " . date("d-m-Y") . ".</strong></p>
  62. </div>
  63. </div>
  64. </body>
  65. </html>";
  66. $email = "chcalvoleon@mindden.com";
  67. $rutaArray = array(FCPATH . 'uploads/Licitaciones_' . date("d-m-Y") . ".xlsx");
  68. enviarEmail($asunto, $cuerpo, $rutaArray, false);
  69. }
  70. }