· 10 years ago · Aug 20, 2016, 01:28 AM
1<?php
2require_once('phpmailer/PHPMailerAutoload.php');
3if(isset($_POST['submit'])){
4 $mail = new PHPMailer(true);
5 $email = "yotubersespgamers@gmail.com";
6 $name = "Brigada113";
7 $email_from = "osmanygon@gmail.com";
8 $name_from = "Brigada113";
9 $nombre = $_POST['nombre'];
10 $steamurl = $_POST['steamurl'];
11 $arma = $_POST['arma'];
12 $message = $_POST['message'];
13
14 $mail->IsSMTP(); // telling the class to use SMTP
15 $mail->SMTPAuth = true; // enable SMTP authentication
16 $mail->SMTPSecure = "ssl"; // sets the prefix to the servier
17 $mail->Host = "smtp.gmail.com"; // sets GMAIL as the SMTP server
18 $mail->Port = 465; // set the SMTP port for the GMAIL server
19 $mail->Username = "****@gmail.com"; // GMAIL username
20 $mail->Password = "*******"; // GMAIL password
21
22$email = "yotubersespgamers@gmail.com";
23//Typical mail data
24$mail->AddAddress($email, $name);
25$mail->SetFrom($email_from, $name_from);
26$mail->Subject = "Nueva solicitud";
27$mail->Body = '
28 <html>
29 <head>
30 <title>Nuevo integrante</title>
31 </head>
32 <body>
33 <h1>'.$nombre.'</h1>
34 <h3>Steam: '.$steamurl.' | Arma: '.$arma.'</h3>
35 <p>
36 <b>'.$message.'
37 </p>
38 </body>
39 </html>
40 ';
41}
42?>