php的附件邮件类
<? class CMailFile { var $subject; var $addr_to; var $text_body; var $text_encoded; var $mime_headers; var $mime_boundary = "--==================_846811060==_"; var $smtp_headers; function CMailFile($subject,$to,$from,$msg,$filename,$downfilename,$mimetype = "application/octet-stream",$mime_filename = false) { $this->subject = $subject; $this->addr_to = $to; $this->smtp_headers = $this->write_smtpheaders($from); $this->text_body = $this->write_body($msg); $this->text_encoded = $this->attach_file($filename,$downfilename,$mimetype,$mime_filename); $this->mime_headers = $this->write_mimeheaders($filename, $mime_filename); } function attach_file($filename,$downfilename,$mimetype,$mime_filename) { $encoded = $this->encode_file($filename); if ($mime_filename) $filename = $mime_filename; $out = "--" . $this->mime_boundary . "\n"; $out = $out . "Content-type: " . $mimetype . "; name=\"$filename\";\n"; $out = $out . "Content-Transfer-Encoding: base64\n"; $out = $out . "Content-disposition: attachment; filename=
这是一个php的附件邮件类,需要的朋友可以下载使用
免责声明
本站所有资源均由网友贡献或各大下载网站转载。请自行检查软件的完整性!本站所有资源仅供学习参考。请不要将它们用于商业目的。否则,一切后果由您负责!如有侵权,请联系我们删除。联系方式:admin@php.cn
相关文章

17Dec2024
使用 Python 的 smtplib 发送附件 使用 Python 的 smtplib 发送电子邮件轻而易举,但包含附件似乎有点神秘……

07Dec2024
使用 PHP 和 PHPMailer 从表单发送文件附件在 process.php 文件中,您可以使用以下命令将上传的文件附加到电子邮件中:

02Nov2024
如何在 PHP 中将多个文件附加到一封电子邮件中 在 PHP 中,您可以将多个文件附加到一封电子邮件中并同时发送它们。这对于...有用


Hot Tools

热门文章
如何解决真三国无双:起源在 Windows 中一直冻结的问题?
24Jan2025故障排查
Aloft:如何制作木制齿轮
23Jan2025手游攻略
Synduality: Echo Of Ada - 如何解锁单人任务
25Jan2025手游攻略
Hello Kitty 岛冒险:巧克力猫角色指南
24Jan2025手游攻略
如何修复KB5050081无法在Windows 10中安装?
31Jan2025故障排查