Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $nume = $_POST['nume'];
- $prenume = $_POST['prenume'];
- $telefon = $_POST['telefon'];
- $emailT = $_POST['email'];
- $mesaj = $_POST['mesaj'];
- $mail = new PHPMailer;
- $mail->isSMTP();
- $mail->Host = 'mail.iulianbesliu.ro';
- $mail->SMTPAuth = true;
- $mail->Username = 'contact@iulianbesliu.ro';
- $mail->Password = 'password';
- $mail->Port = 25;
- $mail->From = $emailT;
- $mail->FromName = $nume;
- $mail->addAddress('contact@iulianbesliu.ro');
- $mail->AddCustomHeader('Reply-to:info@xpal.com');
- $mail->Subject = 'Utilizator Site';
- $mail->Body = 'Nume: ' . $nume . ' ' . ' Data Eveniment: ' . $prenume . ' ' . 'telefon: ' . $telefon . "rn" . $mesaj;
- if(!$mail->send()) {
- ?>
- <script>
- alertify.error("Message could not be sent.");
- </script>
- <?php
- //echo 'Mailer Error: ' . $mail->ErrorInfo;
- } else {
- ?>
- <script>
- alertify.success("Message has been sent");
- </script>
- <?php
- }
- $responseMail = new PHPMailer;
- $responseMail->isSMTP();
- $responseMail->Host = 'mail.iulianbesliu.ro';
- $responseMail->SMTPAuth = true;
- $responseMail->Username = 'contact@iulianbesliu.ro';
- $responseMail->Password = 'password';
- $responseMail->Port = 25;
- $responseMail->From = 'contact@iulianbesliu.ro';
- $responseMail->FromName = 'Iulian Besliu';
- $responseMail->addAddress($emailT);
- $responseMail->AddCustomHeader('Reply-to:info@xpal.com');
- $responseMail->Subject = 'Utilizator Site';
- $responseMail->Body = 'Buna ziua dl/dna ' . $nume . "rn" . 'Va multumim pentru interesul acordat in vizualizarea paginii noastre, mesajul dumneavoastra a fost inregistrat si vom revenii cu un raspuns in cel mai scurt timp posibil !' . "rn" . 'Toate cele bune,' . "rn" . 'Iulian B`enter code here`esliu';
- $responseMail->send();
- $mail->From = 'contact@iulianbesliu.ro';
- $mail->addReplyTo($emailT, $nume);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement