Línea 5979... |
Línea 5979... |
5979 |
if (empty($mail->MessageID)) {
|
5979 |
if (empty($mail->MessageID)) {
|
5980 |
$mail->MessageID = generate_email_messageid();
|
5980 |
$mail->MessageID = generate_email_messageid();
|
5981 |
}
|
5981 |
}
|
Línea 5982... |
Línea 5982... |
5982 |
|
5982 |
|
5983 |
if ($messagehtml && !empty($user->mailformat) && $user->mailformat == 1) {
|
5983 |
if ($messagehtml && !empty($user->mailformat) && $user->mailformat == 1) {
|
5984 |
// Don't ever send HTML to users who don't want it.
|
5984 |
// Obtener las URLs correctamente
|
Línea 5985... |
Línea 5985... |
5985 |
$themeconfig = \theme_config::load('universe_child');
|
5985 |
$themeconfig = \theme_config::load('universe_child');
|
5986 |
|
5986 |
|
- |
|
5987 |
$header_image_url = $themeconfig->image_url('logo-horizontal-cesa', 'theme')->out(false);
|
5987 |
$header_image_url = $themeconfig->image_url('logo-horizontal-cesa', 'universe_child')->out(false);
|
5988 |
$footer_image_url = $themeconfig->image_url('email-footer', 'theme')->out(false);
|
5988 |
$footer_image_url = $themeconfig->image_url('email-footer', 'universe_child')->out(false);
|
5989 |
|
5989 |
// HTML del Header
|
5990 |
// Armar HTML del header
|
5990 |
$header_html = '<div style="text-align:center; margin-bottom:20px;">'
|
5991 |
$header_html = '<div style="text-align:center; margin-bottom:20px;">'
|
Línea 5991... |
Línea 5992... |
5991 |
. '<img src="' . $header_image_url . '" alt="Header Image" style="max-width:100%; height:auto;">'
|
5992 |
. '<img src="' . $header_image_url . '" alt="Header Image" style="max-width:100%; height:auto;">'
|
5992 |
. '</div>';
|
5993 |
. '</div>';
|
5993 |
|
5994 |
|
5994 |
// HTML del Footer
|
5995 |
// Armar HTML del footer
|
Línea -... |
Línea 5996... |
- |
|
5996 |
$footer_html = '<div style="text-align:center; margin-top:40px;">'
|
- |
|
5997 |
. '<img src="' . $footer_image_url . '" alt="Footer Image" style="max-width:100%; height:auto;">'
|
- |
|
5998 |
. '</div>';
|
5995 |
$footer_html = '<div style="text-align:center; margin-top:40px;">'
|
5999 |
|
5996 |
. '<img src="' . $footer_image_url . '" alt="Footer Image" style="max-width:100%; height:auto;">'
|
6000 |
// Armamos el nuevo body: header + contenido original + footer
|
5997 |
. '</div>';
|
6001 |
$full_html_message = $header_html . $messagehtml . $footer_html;
|
5998 |
|
6002 |
|
5999 |
$mail->isHTML(true);
|
6003 |
$mail->isHTML(true);
|
6000 |
$mail->Encoding = 'quoted-printable';
|
6004 |
$mail->Encoding = 'quoted-printable';
|
6001 |
$mail->Body = $messagehtml;
|
6005 |
$mail->Body = $full_html_message; // AQUÍ usamos el mensaje completo
|
6002 |
$mail->AltBody = $header_html . "\n$messagetext\n" . $footer_html;
|
6006 |
$mail->AltBody = strip_tags($header_html) . "\n" . $messagetext . "\n" . strip_tags($footer_html); // Texto plano alternativo
|