Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
SMTP string
Used under Windows only: DNS name or IP address of the SMTP server PHP should use for mail sent with the mail() function.
smtp_port int
Used under Windows only: Number of the port to connect to the server specified with the SMTP setting when sending mail with mail(); defaults to 25. Only available since PHP 4.3.0.
<?php
$sendTo = "info@email.com";
$subject = "Message received from the Info Site";
/* header information not including sendTo and Subject
these all go in one variable. First, include From:*/
$headers = "From: " . $_POST["name"];
$headers .= "<" . $_POST["email"] .">\r\n";
// next include a Reply-To:
$headers .= "Reply-To: " . $_POST["email"];
$message = $_POST["message"];
// send the mail!
mail($sendTo, $subject, $message, $headers);
?>
<?php
$headers = "from asmtony@ses.co.uk";
$toEmail = "some@yahoo.co.uk";
$myMessage = "Hi me, Just testing out an email system on my com ";
$mySubject = "Hi T";
mail($toEmail, $mySubject, $myMessage, $headers);
print "<h1> mail has been sent </h1>";
?>
Your code has no CRLF separators, thus the extra headers cannot be interpreted correctly.from = "From:" mailbox-list CRLF
sender = "Sender:" mailbox CRLF
reply-to = "Reply-To:" address-list CRLF