<? 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=
This is a php attachment email class, friends who need it can download and use
All resources on this site are contributed by netizens or reprinted by major download sites. Please check the integrity of the software yourself! All resources on this site are for learning reference only. Please do not use them for commercial purposes. Otherwise, you will be responsible for all consequences! If there is any infringement, please contact us to delete it. Contact information: admin@php.cn
Related Article
07Aug2023
Configuration method and parameter description of PHP email docking class 1. Background introduction With the rapid development of the Internet, email has become an important tool for people to communicate and exchange information. When developing web applications, we often need to use PHP to send emails. In order to facilitate email docking for developers, many excellent PHP email docking libraries have been developed, including PHPMailer, SwiftMailer, etc. This article will focus on the configuration method and parameter description of the PHPMailer class to help
13Jul2016
24 useful PHP libraries to share, 24php libraries. 24 useful PHP libraries to share, 24php libraries Currently, PHP is the most popular scripting language used for web development. You can easily find a lot of information about PHP on the Internet, including documentation, tutorials,
13Jul2016
15 very practical open source PHP libraries, 15 open source libraries. 15 very practical open source PHP class libraries, 15 open source class libraries The PHP library provides developers with a standard interface, which helps developers make full use of object-oriented programming in PHP. These libraries are specific
07Aug2023
Tips and precautions for using the PHP email docking class Email plays an important role in modern society, and the PHP email docking class provides us with a convenient and fast way to send and receive emails. Whether it is website registration verification emails, password retrieval emails, or email marketing and other scenarios, they are all inseparable from the support of email docking. In this article, we will introduce the tips and precautions for using the PHP email docking class, and provide some code examples to help you use it better. 1. Choosing the right email docking PHP has many advantages
Hot Tools
PHP library for dependency injection containers
PHP library for dependency injection containers
A collection of 50 excellent classic PHP algorithms
Classic PHP algorithm, learn excellent ideas and expand your thinking
Small PHP library for optimizing images
Small PHP library for optimizing images