Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\Users\Steffi\Desktop\dissertation second site\server\distribute_apache2.0\htdocs\sendmail.php on line 15
my php code for this is
Code: Select all
<?php
if (isset($_POST['send']))
{
$to = $_POST['emailler'];
$name_field = $_POST['name'];
$email_field = $_POST['email'];
$message = $_POST['message'];
$subject = "Website Question";
$body = "From: $name_field\n E-Mail: $email_field\n Message:\n $message";
echo "Data has been submitted to $to!";
mail ($to, $body, $subject);
} else {
echo "your email has not been sent please try again!";
}
?>[mail function]
; For Win32 only.
SMTP = localhost
smtp_port = 25
; For Win32 only.
;sendmail_from = me@example.com
; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
;sendmail_path =
how would i set this within the form?