I have never learned how to use phpmail to send emails. php downloaded a webpage template today. there is a script for sending emails: PHPcode & lt ;? PhpThisisthescriptforsendingemail. changetheemailaddressbelowtoyourownemailaddress. $ mailTo [email & # php mail send mail
I have never learned how to use php. today I downloaded a webpage template and a script for sending emails.
PHP code
\n";$headers .= "Reply-To: $name <$mailFrom>\n";$message = $message_text;mail($mailTo, $subject, $message, $headers );?>
Can an email be sent simply? Don't you need to set smtp pop3 or something like that? who is the sender of the post?
------ Solution --------------------
Your computer itself is an account.
------ Solution --------------------
Discussion
Your computer itself is an account.
------ Solution --------------------
Php. ini has a [mail function] configuration option.
; For Win32 only.
Http://php.net/sendmail-from
; Sendmail_from = [email protected]
; For Unix only. You may supply arguments as well (default: "sendmail-t-I ").
Http://php.net/sendmail-path
; Sendmail_path =
Http://www.w3school.com.cn/php/php_ref_mail.asp
------ Solution --------------------
With this script alone, you cannot send emails.
Manual: bool mail (string $ to, string $ subject, string $ message [, string $ additional_headers [, string $ additional_parameters])
The email server must be configured. But you didn't see it.
The source of the mail is related to the mail server.
As for the from statement, you can write it as needed.
This is where many spam messages are located.
Many from statements are deceptive.
You can try it yourself ~~~
------ Solution --------------------
Of course, you must configure the sending server. For linux/unix operating systems, the sending function is provided.
------ Solution --------------------
In WINDOWS, configure the SMTP service.
------ Solution --------------------
Discussion
I have never learned how to use php. today I downloaded a webpage template and a script for sending emails.
PHP code
// This is the script for sending email.
// Change the email address below to your own email address.
$ MailTo = [email protected] ';
$ Name = htmlsp ......