Hi Fantastic piece of work. I have a problem with the Contact Form email. Followed the documentation and done the testmail.php which is sending mail fine. however, when I change the $to in contact.php to the same contact email the form is not sending the message. My account is Apple iCloud and testmail.php is sending to it with no issues. Any advise? Regards Martin
Fantastic piece of work. I have a […]
Fantastic piece of work.
I have a problem with the Contact Form email.
Followed the documentation and done the testmail.php which is sending mail fine.
however, when I change the $to in contact.php to the same contact email the form is not sending the message.
My account is Apple iCloud and testmail.php is sending to it with no issues.
Any advise?
Regards
Martin
Thank you!
Did you test contact form with other mail services?
You were right, different mail service works fine.
I have stumbled upon another problem though - I have added another Text Box collecting Contact Number on the index.html form.
I have added these to contact.php
if (isset($_POST["name"]) && isset($_POST["lastname"]) && isset($_POST["email"]) && isset($_POST["phone"]) && isset($_POST["message"])) {
$content = "Name: " . $_POST["name"] . "\r\n";
$content .= "Last Name: " . $_POST["lastname"] . "\r\n";
$content .= "Email: " . $_POST["email"] . "\r\n";
$content .= "Phone: " . $_POST["phone"] . "\r\n";
$content .= "Message: " . "\r\n" . $_POST["message"];
Contact Form is sending the email fine but the value 'Phone' is not picked up - is there any other files that need to be edited?
Thank you in anticipation,
Martin
"assets/js/plugins.min.js"
"assets/js/plugins.js"
Add after this line your phone input:
var message = $('#contact-form [name="message"]').val();
And here:
data: {
name: name,
lastname: lastname,
email: email,
message: message,
...
},