[HTML]
1. Example:
[HTML]
1. $content = "Ceshi";
2. $technicalemail = "www.2cto.com";
3. $headers = "From: =?utf-8?" B? ". Base64_encode (' Chenglong '). "? = < $technicalemail >\r\n ";
4.
5. $content = Strip_tags ($content);
6. $a = @mail ($technicalemail, ' =?utf-8? B? '. Base64_encode (' Commit error '). '? = ', $content, $headers);
7. if ($a)
8. {
9. Echo ' Mail sent successfully! ';
10.}
Sent via the Mail () function:
1, need to configure php.ini mail message
Open the PHP.ini configuration file and configure the red location
; For Win32 only.
SMTP = localhost---If the sendmail is installed, this means using a local mail server, an IP address, and a server domain name
Smtp_port =---port number
; For Win32 only.
Sendmail_from = www.2cto.com---can be written not to write the semicolon removed here
; For Unix only. Supply arguments as well (default: "Sendmail-t-i").
; sendmail_path = path to----mail server
2.mail () function
The mail () function allows e-mail to be sent directly from the script
The Mail () function returns a Boolean value that returns true successfully and fails to return flase
Mail (to,subject,message,headers,paeameters);
To-required to specify the recipient of the message
Subject--required, specifies the subject of the message, which cannot contain any newline characters
Message-required to specify the messages to be sent
Headers-optional, specify additional headers such as FROM,CC and Bcc to refer to some information
Parameters--optional, specify additional parameters for the SendMail program
3. PHP.ini will Extension=php_imap.dll ";" in front of the
Author: vericlongmore
http://www.bkjia.com/PHPjc/478152.html www.bkjia.com true http://www.bkjia.com/PHPjc/478152.html techarticle [HTML] 1.span style=font-size:18px; instance:/span [HTML] 1. $content =ceshi; 2. $technicalemail =www.2cto.com; 3. $headers = from: =?utf-8? B?. Base64_encode (Chenglong).? = $technicalemai ...