Answer the question
In order to leave comments, you need to log in
How to access php file to send email?
I have a site on CMS H-SCRIPT, Smarty template engine, how can I access a php file to send an email? (AJAX+PHP)
Answer the question
In order to leave comments, you need to log in
A simple, simplified
JS example
$.post(
'/mail.php',
{
email: $('#email').val(),
message: .......
}, function (data) {
if(data) {
alert('Сообщение отправлено!');
} else {
alert('Ошибка');
}
}
);
<?php
return mail($_POST['email'], ' Тема моего письма... ', $_POST['message']);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question