A very practical complete email sending program _ PHP Tutorial

Source: Internet
Author: User
A very practical complete email sending program. A very practical and complete email sending program is very simple. just copy the following code to a blank text page, such as index. php, and run it. Specific example: zsvalley.uhome.net is a very practical and complete email sending program. it is very simple to copy the following code to a blank text page, such as index. php. just run it. Specific instance: http://zsvalley.uhome.net/email/index.php.
The following is the complete source code: (If you have any questions, please email: zsvalley@cmmail.com)


If ($ OK = 'yes '){
// SetCookie ("yname", $ yname );
// SetCookie ("yemail", $ yemail );

If (! Eregi ("^ [_. 0-9a-z-] + @ ([0-9a-z] [0-9a-z-] +.) + [a-z] {2, 3} $", $ yemail )){

Echo "Please enter your EMAIL address correctly! Return ";

} Elseif (! Eregi ("^ [_. 0-9a-z-] + @ ([0-9a-z] [0-9a-z-] +.) + [a-z] {2, 3} $", $ femail )){

Echo "Please enter your friend's EMAIL address correctly! Return ";

} Else {

$ Message = $ fname. "Hello, nn, your friend ". $ yname. "I want to send a special letter to you: n ------------------------------------- n ". $ comments. "n --------------------------------- nnn service: http://zsvalley.uhome.net/email/nn?#◆ valley network borderless http://valley.coc.cc ◆ n ── ─ n ";

// Send by email
Mail ($ femail, $ title, $ message, "From: $ yemail ");
// Echo nl2br ($ message );
$ OK = 'no ';
Echo"". Nl2br ($ message )."

Return to the sending page

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.