Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require('phpmailer/class.phpmailer.php');
- $mail = new PHPMailer();
- $mail->IsSMTP();
- $mail->SMTPDebug = 0;
- $mail->SMTPAuth = TRUE;
- $mail->SMTPSecure = "tls";
- $mail->Port = 587;
- $mail->Username = "mojoshoe";
- $mail->Password = "9q3rD69drN";
- $mail->Host = "mojoshoes.rs";
- $mail->Mailer = "smtp";
- $mail->SetFrom($_POST["userEmail"], $_POST["userName"]);
- $mail->AddReplyTo($_POST["userEmail"], $_POST["userName"]);
- $mail->AddAddress("ketyboka@gmail.com");
- $mail->Subject = $_POST["subject"];
- $mail->WordWrap = 80;
- $mail->MsgHTML($_POST["content"]);
- $mail->MsgHTML($_POST["adresa"]);
- if(is_array($_FILES)) {
- $mail->AddAttachment($_FILES['attachmentFile']['tmp_name'],$_FILES['attachmentFile']['name']);
- }
- $mail->IsHTML(true);
- if(!$mail->Send()) {
- echo "<p class='error'>Problem pri slanju poruke.</p>";
- } else {
- echo "<p class='success'>Uspešno ste poslali poruku.</p>";
- }
- ?>
Add Comment
Please, Sign In to add comment