I gdy wysyłam formularz to tylko znikają dane, nie ma żadnego komuniaktu a mail nie dochodzi.
plik kontakt.html - głowny katalog
wycinek pliku forms.js - podkatalog js
(function($){ $.fn.extend({ forms:function(opt){ if(opt===undefined) opt={} this.each(function(){ var th=$(this), data=th.data('forms'), _={ errorCl:'error', emptyCl:'empty', invalidCl:'invalid', successCl:'success', successShow:'4000', mailHandlerURL:'/mail/MailHandler.php', ownerEmail:'stefan623@onet.pl', stripHTML:true, smtpMailServer:'localhost', targets:'input,textarea', controls:'a[data-type=reset],a[data-type=submit]', validate:true, rx:{
oraz plik MailHandler.php - podkatalog mail
<?php $owner_email = $_POST["owner_email"]; $headers = 'From:' . $_POST["email"]; $subject = 'Wiadomosc ze strony: ' . $_POST["name"]; $messageBody = ""; if($_POST['name']!='nope'){ $messageBody .= '<p>Visitor: ' . $_POST["name"] . '</p>' . "\n"; $messageBody .= '<br>' . "\n"; } if($_POST['email']!='nope'){ $messageBody .= '<p>Email Address: ' . $_POST['email'] . '</p>' . "\n"; $messageBody .= '<br>' . "\n"; } if($_POST['state']!='nope'){ $messageBody .= '<p>State: ' . $_POST['state'] . '</p>' . "\n"; $messageBody .= '<br>' . "\n"; } if($_POST['phone']!='nope'){ $messageBody .= '<p>Phone Number: ' . $_POST['phone'] . '</p>' . "\n"; $messageBody .= '<br>' . "\n"; } if($_POST['fax']!='nope'){ $messageBody .= '<p>Fax Number: ' . $_POST['fax'] . '</p>' . "\n"; $messageBody .= '<br>' . "\n"; } if($_POST['message']!='nope'){ $messageBody .= '<p>Message: ' . $_POST['message'] . '</p>' . "\n"; } if($_POST["stripHTML"] == 'true'){ } try{ throw new Exception('mail failed'); }else{ } }catch(Exception $e){ } ?>
Nie wiem czy w pliku forms.js dobrze jest to:
mailHandlerURL:'/mail/MailHandler.php', ownerEmail:'stefan623@onet.pl', smtpMailServer:'localhost',
próbowałe też
mailHandlerURL:'mail/MailHandler.php',
stefan623@onet.pl - to oczywiście mój email
Jest jeszcze plik MailHandler.ashx - ale nie wiem czy ma znaczenie.
Proszę o pomoc!