Using a PHP implementation to send an email with from

Source: Internet
Author: User
Tags copy mail
This tutorial belongs to the original download, reproduced please indicate from the Web page teaching network

Description: Using PHP to send e-mail is relatively simple! You can take a look at the complete code below.

1. Copy the following code into your Web page and copy it to. HTML file.

<form action= "mail.php" method= "POST" >
<p align= "center" >
<font face= "Verdana" >
<input type= "text" name= "name" style= "border:1px solid #000000" style= "Font:verdana" style= "color: #000000" style= "f ont-size:8pt "style=" Background-color: #FFFFFF "><br>
E-Mail address:<br>
<input type= "text" name= "email" style= "border:1px solid #000000" style= "Font:verdana" style= "color: #000000" style= " font-size:8pt "style=" Background-color: #FFFFFF "><Br>
Website url:<br>
<input type= "text" name= "url" style= "border:1px solid #000000" style= "Font:verdana" style= "color: #000000" style= "fo nt-size:8pt "style=" Background-color: #FFFFFF "><Br>
<input type= "Submit" value= "Submit" style= "border:1px solid #000000" style= "Font:verdana" style= "color: #000000" sty Le= "font-size:8pt" style= "Background-color: #FFFFFF" >

2. Create mail.php files and keep them in the same directory as above.

$contactemail = "";
$subject = "you choose";
$message. = "Name: $name\n";
$message. = "E-mail: $email\n";
$message. = "Website URL: $url\n";
Mail ($contactemail, $subject, $message);
echo "For mailing me, I should reply with in a few
Days. "

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