I found two PHP mail sending examples on the Internet. They are very good. I posted them for reference for beginners. I don't know if any of them have been posted.

Source: Internet
Author: User

Send Mail in PHP In this example, we will show how to send an email message to someone in PHP. PHP Code: "; Mail (" karn@nucleus.com "," Subject "," Hello! "); Echo" Sending mail... "; echo" ";?> It is that simple! The PHP mail function has up to four parameters. the first parameter is the recipient of the message. the second parameter is the subject of the email message. the third parameter is the body of the message. and the fourth parameter is optional, which will be covered on the next page. if the above example does not work when you view it in your browser then the Sendmail variable in your PHP setup file is probably not set correctly. in UNIX, it shoshould be set to something like/usr/sbin/sendmail-t. consult your PHP documentation for more in depth instructions.

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.