About PHP Syntax (5) _php Tutorial

Source: Internet
Author: User
Body:
Send email online, you can use the mail () function. The format is as follows:
Mail (recipient, subject, content, mail file header);
On the Internet, send email to webmaster, usually this: webmaster@163.com so, when clicked Webmaste Queensland Unlimited r@163.com This link, will start the default mail editor to write email, it is troublesome, using the mail () function, You can easily compile an online sending page. The recipient of this Queensland Unlimited page is fixed (webmaster@163.com), there is a need to refill the recipient's address, and the subject we can also be set it down. The following example:
Files: email.html


<title>Send to Webmaster</title>


Network Management receiving letter









Files: mail.php
if (empty ($from) or empty ($subject) or empty ($content)) {echo "is not completed, please return";}
$body = "[subject] $subjectn";
$body. = "[sender] $fromn";
$body. = $content;
$deal =mail ("webmaster@163.com", $subject, $body, "from: $from");
if ($deal) {echo ' sent successfully! ";} Else{echo "failed to send a piece!!! ";}
?>
PHP introduced to this, also almost, you do not feel the power of PHP, is not also want to join the ranks of PHP, right now. To make yourself fly in PHP, this knowledge is still Queensland unlimited insufficient, it can only help you get started. After the introduction, the practice is personal. Good-bye, my friend, (^_^)
--(end of full text)--

http://www.bkjia.com/PHPjc/315389.html www.bkjia.com true http://www.bkjia.com/PHPjc/315389.html techarticle text: Send email online, you can use the mail () function. The format is as follows: Mail (recipient, subject, content, mail file header); On the Internet, send an email to the webmaster, usually this: ...

  • 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.