Se agrega formato de correo y correo a solicitante
This commit is contained in:
@ -17,10 +17,18 @@ class Contacto {
|
||||
$post = $request->getParsedBody();
|
||||
|
||||
$body = [];
|
||||
$filename = implode(DIRECTORY_SEPARATOR, [
|
||||
$container->get('folders.templates'),
|
||||
'contacto',
|
||||
'email.php'
|
||||
]);
|
||||
$html = file_get_contents($filename);
|
||||
foreach ($post as $key => $val) {
|
||||
$body []= $key . ': ' . $val;
|
||||
$body []= ucwords($key) . ': ' . $val;
|
||||
$html = str_replace('{{$' . $key . '}}', $val, $html);
|
||||
}
|
||||
$body = implode(PHP_EOL, $body);
|
||||
|
||||
$subject = 'Contacto Web - ' . $post['nombre'];
|
||||
|
||||
$message = $container->make(Message::class)
|
||||
@ -29,13 +37,13 @@ class Contacto {
|
||||
->addCc($container->get('email.administrativo'))
|
||||
->setSubject($subject)
|
||||
->setBody($body)
|
||||
->setHTMLBody(nl2br($body));
|
||||
->setHTMLBody($html);
|
||||
$mailer->send($message);
|
||||
$message = $container->make(Message::class)
|
||||
->setFrom($container->get('email')['username'])
|
||||
->addTo($post['email'], $post['nombre'])
|
||||
->setSubject($subject)
|
||||
->setBody('Su correo a Notaría Patricio Raby ha sido recibido.');
|
||||
->setBody('Su correo a Notaría Patricio Raby Benavente ha sido recibido.');
|
||||
$mailer->send($message);
|
||||
|
||||
$output = [
|
||||
|
@ -5,6 +5,11 @@
|
||||
background-blend-mode: multiply;
|
||||
color: white;
|
||||
}
|
||||
@media screen and (max-width: 991px) {
|
||||
#banner {
|
||||
background-position: 75% !important;
|
||||
}
|
||||
}
|
||||
#banner a {
|
||||
color: inherit;
|
||||
}
|
||||
@ -103,11 +108,11 @@
|
||||
font-weight: bold;
|
||||
font-size: 16pt;
|
||||
}
|
||||
|
||||
#servicios .seguimiento {
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
background-size: cover;
|
||||
min-height: 10rem !important;
|
||||
}
|
||||
|
||||
#indice .grid {
|
||||
@ -124,6 +129,7 @@
|
||||
#indice .img,
|
||||
#indice .img img {
|
||||
max-height: 20rem !important;
|
||||
min-height: 10rem !important;
|
||||
}
|
||||
#indice .contenido {
|
||||
padding-top: 5rem !important;
|
||||
|
47
resources/views/contacto/email.php
Normal file
47
resources/views/contacto/email.php
Normal file
@ -0,0 +1,47 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Contacto Web - {{$nombre}}</title>
|
||||
<!--[if !mso]><!-- -->
|
||||
|
||||
<link href='http://fonts.googleapis.com/css2?family=Roboto' rel='stylesheet' type='text/css' />
|
||||
|
||||
<!--<![endif]-->
|
||||
</head>
|
||||
<body>
|
||||
<table style="font-family: Roboto, sans-serif; font-size: 12pt; color: rgb(109, 110, 112);">
|
||||
<tr>
|
||||
<td style="font-weight: 700; text-align: right;">
|
||||
Nombre
|
||||
</td>
|
||||
<td colspan="6">
|
||||
{{$nombre}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-weight: 700; text-align: right;">
|
||||
Teléfono
|
||||
</td>
|
||||
<td colspan="6">
|
||||
{{$telefono}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-weight: 700; text-align: right;">
|
||||
Email
|
||||
</td>
|
||||
<td colspan="6">
|
||||
{{$email}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-weight: 700; text-align: right; vertical-align: top;">
|
||||
Mensaje
|
||||
</td>
|
||||
<td colspan="6">
|
||||
{{$mensaje}}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user