<?php mail( "ywg_263@263.net", "message from php", "hello, xiaoyz! " ); ?> |
<?php $emails = Array( "xiaoyz@birdy.dhs.org", "xiaoyz@hotmail.com" ); mail( implode(",", $emails), "message from php", "hello, xiaoyz!" ); ?> |
Received: from localhost (localhost [127.0.0.1]) by mx01.263.net (Postfix) with SMTP id E7C8B1DC38A78 for <ywg_263@263.net>; Sat, 8 Dec 2001 20:08:45 +0800 (CST) Received: by birdy.dhs.org (Postfix, from userid 48) id 706F3C4923A; Sun, 9 Dec 2001 03:52:26 +0800 (CST) To: ywg_263@263.net Subject: message from php Message-Id: <20011208195226.706F3C4923A@birdy.dhs.org> Date: Sun, 9 Dec 2001 03:52:26 +0800 (CST) From: apache@birdy.dhs.org (Apache User) |
<?php $to = "ywg_sn@sina.com"; $subject = "html message from php"; $message = "<html><title>html message</title><body bgcolor=#cccccc> <h1><font color=red>hello, xiaoyz!</font></h1></body></html>"; $additional = "From: ywg_263@263.net\nReply-To:ywg_263@263.net\n X-Mailer:PHP\nX-Priority:2\nContent-Type: text/html; charset=\"GB2312\"\n Content-Transfer-Encoding: 7bit\nMIME-Version: 1.0"; mail( $to, $subject, $message, $additional ); ?> |
To: ywg_sn@sina.com Subject: jpg picture from xiaoyz Content-Type: image/jpg; name='picture.jpg' Content-Transfer-Encoding: base64 Content-Description: xiaoyz's picture From: 'xiaoyz' <ywg_263@263.net> |
<?php $fp = fopen( $attach, "r" ); $content = fread($fp, filesize($attach)); //读取文件内容 $content = chunk_split( base64_encode($content) ); //进行base64编码,并在每76个字符后面加上\r\n ?> |
Return-Path: <ywg_263@263.net> Delivered-To: ywg_sn@sina.com Received: (qmail 20639 invoked from network); 9 Dec 2001 08:04:25 -0000 Received: from unknown (HELO smtp.263.net) (202.96.44.19) by 202.106.187.149 with SMTP; 9 Dec 2001 08:04:25 -0000 Received: from localhost (localhost [127.0.0.1]) by smtp.263.net (Postfix) with SMTP id B431D1DEBCAAA for <ywg_sn@sina.com>; Sun, 9 Dec 2001 16:08:44 +0800 (CST) Message-ID: <004f01c18089$938e83b0$a32869a2@xiaoyz> From: <ywg_263@263.net> To: <ywg_sn@sina.com> Subject: multipart MIME Date: Sun, 9 Dec 2001 16:14:08 +0800 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0049_01C180CC.87D17760" X-Priority: 3 This is a multi-part message in MIME format. ----=_NextPart_000_0049_01C180CC.87D17760 |
hello, xiaoyz!
------=_NextPart_000_0049_01C180CC.87D17760 <html> |
<form name="frm_mail" action="<? print $PHP_SELF; ?>" enctype="multipart/form-data" method="post"> from: <input type="text" name="from"><br> to: <input type="text" name="to"><br> subject: <input type="text" name="subject"><br> attach: <input type="file" name="attach"><br> message: <textarea name="message"></textarea> <input type="submit" name="send" value="send"> </from> |
<?php if( isset($send) ) { //定义边界线 $boundary = uniqid( "" ); //生成邮件头 //获取上传文件的MIME类型 //获取上传文件的名字 //对上传文件进行编码和切分 //生成邮件主体 $message --$boundary $content --$boundary--"; mail( $to, $subject, $body, $header ); |
自由广告区 |
分类导航 |
邮件新闻资讯: IT业界 | 邮件服务器 | 邮件趣闻 | 移动电邮 电子邮箱 | 反垃圾邮件|邮件客户端|网络安全 行业数据 | 邮件人物 | 网站公告 | 行业法规 网络技术: 邮件原理 | 网络协议 | 网络管理 | 传输介质 线路接入 | 路由接口 | 邮件存储 | 华为3Com CISCO技术 | 网络与服务器硬件 操作系统: Windows 9X | Linux&Uinx | Windows NT Windows Vista | FreeBSD | 其它操作系统 邮件服务器: 程序与开发 | Exchange | Qmail | Postfix Sendmail | MDaemon | Domino | Foxmail KerioMail | JavaMail | Winwebmail |James Merak&VisNetic | CMailServer | WinMail 金笛邮件系统 | 其它 | 反垃圾邮件: 综述| 客户端反垃圾邮件|服务器端反垃圾邮件 邮件客户端软件: Outlook | Foxmail | DreamMail| KooMail The bat | 雷鸟 | Eudora |Becky! |Pegasus IncrediMail |其它 电子邮箱: 个人邮箱 | 企业邮箱 |Gmail 移动电子邮件:服务器 | 客户端 | 技术前沿 邮件网络安全: 软件漏洞 | 安全知识 | 病毒公告 |防火墙 攻防技术 | 病毒查杀| ISA | 数字签名 邮件营销: Email营销 | 网络营销 | 营销技巧 |营销案例 邮件人才:招聘 | 职场 | 培训 | 指南 | 职场 解决方案: 邮件系统|反垃圾邮件 |安全 |移动电邮 |招标 产品评测: 邮件系统 |反垃圾邮件 |邮箱 |安全 |客户端 |