What should I do if phpmail sends an email?

Source: Internet
Author: User
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 ......

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.