-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhola.php
66 lines (53 loc) · 1.67 KB
/
hola.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<?php
require_once 'PHPMailer/PHPMailerAutoload.php';
$mail = new PHPMailer;
$mensaje="
<style type='text/css'>
body{
text-align: center;
background-color: #323232;
color: #fff;
}
h1{
font-family: brushstrike;
}
div{
background-color: green;
border-radius: 6px;
padding: 5px;
margin: 25px;
}
</style>
<body>
<div>
<h1>Gracias por comunicarse con nosotros</h1>
<h2>Pronto nos comunicaremos con ud.</h2>
<br>
<p>Saluda a ud <strong>Soporte TIC - Los Angeles</strong></p>
</div>
</body>
";
//$mail->SMTPDebug = 3; // Enable verbose debug output
$correo = $_GET[mail];
$nombre = $_POST[name];
$mail->isSMTP(); // Set mailer to use SMTP
$mail->Host = 'mail.minsal.cl'; // Specify main and backup SMTP servers
$mail->SMTPAuth = true; // Enable SMTP authentication
$mail->Username = 'soportetic.losangeles@redsalud.gob.cl'; // SMTP username
$mail->Password = 'Sl1234567'; // SMTP password
$mail->SMTPSecure = 'ssl'; // Enable TLS encryption, `ssl` also accepted
$mail->Port = 465; // TCP port to connect to
$mail->isHTML(true);
$mail->setFrom('soportetic.losangeles@redsalud.gob.cl', 'Soporte TIC - Los Angeles');
$mail->addAddress($correo, $nombre);
$mail->Subject = 'Soporte TIC - Los Angeles';
$mail->Body = $mensaje;
//$mail->Body = $mensaje;
if(!$mail->send()) {
echo 'Error, mensaje no enviado';
echo 'Error del mensaje: ' . $mail->ErrorInfo;
} else {
echo 'El mensaje se ha enviado correctamente';
Header( "Location: index.html" );
}
?>