Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php include 'mysql.php'; ?>
- dssdfffasfsfsf
- <?php
- //exit('fuffa');
- //echo($tipoutente);
- $mail = isset($_POST['mail']) ? $_POST['mail'] : '';
- //dati UTENTE
- $query = 'SELECT * FROM utenti WHERE username = ' . $mail;
- $res = mysql_query($query);
- $row = mysql_fetch_assoc($res);
- //echo ($query);
- $username = $row['username'];
- $password = $row['password'];
- $nome = $row['nome'];
- $cognome = $row['cognome'];
- $email = $row['mail'];
- //header('location:registrato.php');
- //echo($username);
- //echo($password);
- if ($email == '') {
- header('location:recupero.php?err=1')
- } else {
- // MANDAMAIL
- //invio mail
- require_once 'swift/lib/swift_required.php';
- $mail = 'mail/recupero.html';
- $html = file_get_contents($mail);
- $html = str_replace("#USERNAME", $username, $html);
- $html = str_replace("#PASSWORD", $password, $html);
- $html = str_replace("#NOME", $nome, $html);
- $html = str_replace("#COGNOME", $cognome, $html);
- // Create the Transport
- $transport = Swift_SmtpTransport::newInstance('mail.promotionplus.it', 25)
- ->setUsername('raceandgo@promotionplus.it')
- ->setPassword('pplus0');
- // Create the Mailer using your created Transport
- $mailer = Swift_Mailer::newInstance($transport);
- //echo ("provccc");
- // Create a message
- $message = Swift_Message::newInstance('Registrazione race and go')
- ->setFrom(array('raceandgo@promotionplus.it' => 'Race and go'))
- ->setTo(array($email))
- ->setBody($html, 'text/html');
- // Send the message
- if (!$mailer->send($message, $failures)) {
- echo "Failures:";
- print_r($failures);
- } else {
- header('location: registrato.php');
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement