Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- ini_set('display_errors', 1);
- error_reporting(E_ERROR | E_WARNING);
- include '../PHPMailer/src/PHPMailer.php';
- include '../PHPMailer/src/Exception.php';
- use PHPMailer\PHPMailer\PHPMailer;
- use PHPMailer\PHPMailer\Exception;
- require '../PHPMailer/src/PHPMailer.php';
- require '../PHPMailer/src/SMTP.php';
- require '../PHPMailer/src/Exception.php';
- $lang = $_COOKIE['lang'];
- $dane = $_POST['Dane'];
- $tel = $_POST['Telefon'];
- $email = $_POST['Email'];
- $adres = $_POST['Adres'];
- $model = $_POST['Model'];
- $rodzajpc = $_POST['RodzajPC'];
- $rodzajsys = $_POST['RodzajSys'];
- $opis = $_POST['Opis'];
- $zgoda1 = $_POST['Zgoda1'];
- $zgoda2 = $_POST['Zgoda2'];
- $outside = $_POST['Outside'];
- $cena = $_POST['Cena'];
- $uslugi = $_POST['Uslugi'];
- $rodzajpc = $_POST['RodzajPC'];
- echo "chuj";
- $mail = new PHPMailer(true);
- try {
- //Server settings // Enable verbose debug output
- $mail->setLanguage('pl', '../PHPMailer/langugae/phpmailer.lang-pl.php');
- $mail->isSMTP(); // Set mailer to use SMTP
- $mail->Host = 'mail.infirmarypc.co.uk'; // Specify main and backup SMTP servers
- $mail->SMTPAuth = true; // Enable SMTP authentication
- $mail->Username = 'support@infirmarypc.co.uk'; // SMTP username
- $mail->Password = 'asdki123'; // SMTP password
- $mail->SMTPSecure = 'ssl'; // Enable TLS encryption, `ssl` also accepted
- $mail->Port = 25; // TCP port to connect to
- $mail->setFrom('support@infirmarypc.co.uk', 'Infirmary PC Support');
- $mail->addAddress($email, $dane);
- $mail->isHTML(true);
- $mail->Subject = "Zamowienie: ".$rodzajpc." Model: ".$model;
- if(!isset($_COOKIE['lang']) || $lang == "en"){
- $mail->Body = file_get_contents('../html/szablon.html');
- }
- else{
- $mail->Body = file_get_contents('../html/szablon-pl.html');
- }
- $mail->addBCC('slawomir.glodzik@gmail.com');
- $mail->addBCC('support@infirmarypc.co.uk');
- $mail->addReplyTo($email, $dane);
- if(!$mail->send()){
- echo $mail->ErrorInfo;
- $mail->send();
- }
- else
- echo "chuj1";
- }
- catch (Exception $e) {
- print_r($e);
- echo $mail->ErrorInfo;
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement