时间:2021-07-01 10:21:17 帮助过:3人阅读
- send_mail($from, lvtao@php100.net, "这是邮件的主题", "<html><head>head><body><p><font color=red>这是邮件正文font>p>body>html>");
代码如下:
- function send_mail($from, $to, $subject, $message)
- {
- if ($from == "")
- {
- $from = 吕滔
;//发件人地址 - }
- $headers = MIME-Version: 1.0 . " ";
- $headers .= Content-type: text/html; charset=gb2312 . " ";
- $headers .= From: . $from . " ";
- mail($to, $subject, $message, $headers);
- }
- ?>
http://www.bkjia.com/PHPjc/486324.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/486324.htmlTechArticle写了一个简单的发送HTML邮件的PHP函数。 函数说明:send_mail(发件人地址, 收件人地址, 邮件主题, 邮件正文); 示例: send_mail($from,lvtao@php100....