In Ubuntu (at least 12.04) it seems sendmail is not installed by default. You will have to install it using the command
sudo apt-get install sendmail-bin
You may also need to configure the proper permissions for it as mentioned above.
$msg = nl2br(strip_tags($_POST['message']));
// Using the PHPMailer class
$mail = new PHPMailer();
// Adding the receiving email address
$mail->Subject = 'AisforArt Feedback';
$mail->AddReplyTo('noreply@'.$_SERVER['HTTP_HOST'], 'Quick Feedback');
$mail->SetFrom('noreply@'.$_SERVER['HTTP_HOST'], 'Quick Feedback');
echo 'Thank you!';
Few points to check:
1> is mail function disabled in your server?
This can be checked by using:
mail("YourEmail@domain.com", "Test Subject", "Test Message");
2>is mail From param valid?
$mail->From = $email;
3> did you try with SMTP?
What is PHP_SELF variable?
PHP_SELF is a variable that returns the current script being executed. This variable returns the name and path of the current file (from the root folder). You can use this variable in the action field of the FORM.
a) Suppose your php file is located at the address:
In this case, PHP_SELF will contain:
b) Suppose your php file is located at the address:
For this URL, PHP_SELF will be :