Kontakt skripta/SMTP ne radi | WORDPRESS

Evo uradio sam mailer i SMTP podesio ali ne znam zbog cega nece. I ne znam zbog cega me redirect na mailer nakon sto stisnem “SEND”. Koristim wordpress.
Evo dio iz footera.

<div id="contact">
		<h1>CONTACT ME!</h1>
		<form method="POST" action="<?php bloginfo('template_url'); ?>/inc/mailer.php">
			<input type="text" placeholder="First & Last name.." name="name">
			<input type="email" placeholder="Enter your email..." name="email">
			<textarea placeholder="Your message..." name="message"></textarea>
			<input type="submit" value="SEND" name="button">
		</form>
	</div>

Evo mailer.php:

    <?php
	$emailSubject = "Test Email";
	$webMaster = "l-o-w-e-r@gmail.com";

	$name = $_POST['name'];
	$email = $_POST['email'];
	$message = $_POST['message'];

	$body = <<<EOD
<br><hr><br>
Email: $email <br>
Ime i prezime: $name <br>
Poruka: $message <br>
EOD;

	$headers = "From $email\r\n";
	$headers .= "Content-type: text/html\r\n";
	$success = mail($webMaster, $emailSubject, $body, $headers);

	$theResult = <<<EOD
<h1>Your message has been sent!</h1>
EOD;
?>

Evo sendmail.ini

    [sendmail]

smtp_server=smtp.gmail.com
smtp_port=587
error_logfile=error.log
debug_logfile=debug.log
auth_username=l-o-w-e-r@gmail.com
auth_password=OVDE_STAVIO_PW_OD_RACUNA
force_sender=l-o-w-e-r@gmail.com

php.ini

    [mail function]
; XAMPP: Comment out this if you want to work with an SMTP Server like Mercury
SMTP=smtp.gmail.com
smtp_port=587
sendmail_from = l-o-w-e-r@gmail.com
sendmail_path = "\"C:\xampp\sendmail\sendmail.exe\" -t"

Zna li neko u cemu je problem ?


Copyright © 2020 WM Forum - AboutContact - Sponsored by: Mydataknox & Profit Monkey