分享好友 最新动态首页 最新动态分类 切换频道
2023最新版的Typecho主题模板 Spimes x5.0主题模板支持博客、自媒体、资讯类的网站设计开发全开源源码.zip
2024-12-25 16:28
![PHPMailer](https://raw.github.com/PHPMailer/PHPMailer/master/examples/images/phpmailer.png)

2023最新版的Typecho主题模板 Spimes x5.0主题模板支持博客、自媒体、资讯类的网站设计开发全开源源码.zip

# PHPMailer - A full-featured email creation and transfer class for PHP Build status: [![Build Status](https://travis-ci.org/PHPMailer/PHPMailer.svg)](https://travis-ci.org/PHPMailer/PHPMailer) [![Scrutinizer Quality Score](https://scrutinizer-ci.com/g/PHPMailer/PHPMailer/badges/quality-score.png?s=3758e21d279becdf847a557a56a3ed16dfec9d5d)](https://scrutinizer-ci.com/g/PHPMailer/PHPMailer/) [![Code Coverage](https://scrutinizer-ci.com/g/PHPMailer/PHPMailer/badges/coverage.png?s=3fe6ca5fe8cd2cdf96285756e42932f7ca256962)](https://scrutinizer-ci.com/g/PHPMailer/PHPMailer/) [![Latest Stable Version](https://poser.pugx.org/phpmailer/phpmailer/v/stable.svg)](https://packagist.org/packages/phpmailer/phpmailer) [![Total Downloads](https://poser.pugx.org/phpmailer/phpmailer/downloads)](https://packagist.org/packages/phpmailer/phpmailer) [![Latest Unstable Version](https://poser.pugx.org/phpmailer/phpmailer/v/unstable.svg)](https://packagist.org/packages/phpmailer/phpmailer) [![License](https://poser.pugx.org/phpmailer/phpmailer/license.svg)](https://packagist.org/packages/phpmailer/phpmailer) ## Class Features - Probably the world's most popular code for sending email from PHP! - Used by many open-source projects: WordPress, Drupal, 1CRM, SugarCRM, Yii, Joomla! and many more - Integrated SMTP support - send without a local mail server - Send emails with multiple TOs, CCs, BCCs and REPLY-TOs - Multipart/alternative emails for mail clients that do not read HTML email - Support for UTF-8 content and 8bit, base64, binary, and quoted-printable encodings - SMTP authentication with LOGIN, PLAIN, NTLM, CRAM-MD5 and Google's XOAUTH2 mechanisms over SSL and TLS transports - Error messages in 47 languages! - DKIM and S/MIME signing support - Compatible with PHP 5.0 and later - Much more! ## Why you might need it Many PHP developers utilize email in their code. The only PHP function that supports this is the mail() function. However, it does not provide any assistance for making use of popular features such as HTML-based emails and attachments. Formatting email correctly is surprisingly difficult. There are myriad overlapping RFCs, requiring tight adherence to horribly complicated formatting and encoding rules - the vast majority of code that you'll find online that uses the mail() function directly is just plain wrong! *Please* don't be tempted to do it yourself - if you don't use PHPMailer, there are many other excellent libraries that you should look at before rolling your own - try SwiftMailer, Zend_Mail, eZcomponents etc. The PHP mail() function usually sends via a local mail server, typically fronted by a `sendmail` binary on Linux, BSD and OS X platforms, however, Windows usually doesn't include a local mail server; PHPMailer's integrated SMTP implementation allows email sending on Windows platforms without a local mail server. ## License This software is distributed under the [LGPL 2.1](http://www.gnu.org/licenses/lgpl-2.1.html) license. Please read LICENSE for information on the software availability and distribution. ## Installation & loading PHPMailer is available via [Composer/Packagist](https://packagist.org/packages/phpmailer/phpmailer) (using semantic versioning), so just add this line to your `composer.json` file: ```json "phpmailer/phpmailer": "~5.2" ``` or ```sh composer require phpmailer/phpmailer ``` If you want to use the Gmail XOAUTH2 authentication class, you will also need to add a dependency on the `league/oauth2-client` package. Alternatively, copy the contents of the PHPMailer folder into somewhere that's in your PHP `include_path` setting. If you don't speak git or just want a tarball, click the 'zip' button at the top of the page in GitHub. If you're not using composer's autoloader, PHPMailer provides an SPL-compatible autoloader, and that is the preferred way of loading the library - just `require '/path/to/PHPMailerAutoload.php';` and everything should work. The autoloader does not throw errors if it can't find classes so it prepends itself to the SPL list, allowing your own (or your framework's) autoloader to catch errors. SPL autoloading was introduced in PHP 5.1.0, so if you are using a version older than that you will need to require/include each class manually. PHPMailer does *not* declare a namespace because namespaces were only introduced in PHP 5.3. If you want to use Google's XOAUTH2 authentication mechanism, you need to be running at least PHP 5.4, and load the dependencies listed in `composer.json`. ### Minimal installation While installing the entire package manually or with composer is simple, convenient and reliable, you may want to include only vital files in your project. At the very least you will need [class.phpmailer.php](class.phpmailer.php). If you're using SMTP, you'll need [class.smtp.php](class.smtp.php), and if you're using POP-before SMTP, you'll need [class.pop3.php](class.pop3.php). For all of these, we recommend you use [the autoloader](PHPMailerAutoload.php) too as otherwise you will either have to `require` all classes manually or use some other autoloader. You can skip the [language](language/) folder if you're not showing errors to users and can make do with English-only errors. You may need the additional classes in the [extras](extras/) folder if you are using those features, including NTLM authentication and ics generation. If you're using Google XOAUTH2 you will need `class.phpmaileroauth.php` and `class.oauth.php` classes too, as well as the composer dependencies. ## A Simple Example ```php <?php require 'PHPMailerAutoload.php'; $mail = new PHPMailer; //$mail->SMTPDebug = 3; // Enable verbose debug output $mail->isSMTP(); // Set mailer to use SMTP $mail->Host = 'smtp1.example.com;smtp2.example.com'; // Specify main and backup SMTP servers $mail->SMTPAuth = true; // Enable SMTP authentication $mail->Username = 'user@example.com'; // SMTP username $mail->Password = 'secret'; // SMTP password $mail->SMTPSecure = 'tls'; // Enable TLS encryption, `ssl` also accepted $mail->Port = 587; // TCP port to connect to $mail->setFrom('from@example.com', 'Mailer'); $mail->addAddress('joe@example.net', 'Joe User'); // Add a recipient $mail->addAddress('ellen@example.com'); // Name is optional $mail->addReplyTo('info@example.com', 'Information'); $mail->addCC('cc@example.com'); $mail->addBCC('bcc@example.com'); $mail->addAttachment('/var/tmp/file.tar.gz'); // Add attachments $mail->addAttachment('/tmp/image.jpg', 'new.jpg'); // Optional name $mail->isHTML(true); // Set email format to HTML $mail->Subject = 'Here is the subject'; $mail->Body = 'This is the HTML message body <b>in bold!</b>'; $mail->AltBody = 'This is the body in plain text for non-HTML mail clients'; if(!$mail->send()) { echo 'Message could not be sent.'; echo 'Mailer Error: ' . $mail->ErrorInfo; } else { echo 'Message has been sent'; } ``` You'll find plenty more to play with in the [examples](examples/) folder. That's it. You should now be ready to use PHPMailer! ## Localization PHPMailer defaults to English, but in the [language](language/) folder you'll find numerous (46 at the time of writing!) translations for PHPMailer error messages that you may encounter. Their filenames contain [ISO 639-1](http://en.wikipedia.org/wiki/ISO_639-1) language code for the translations, for example `fr` for French. To specify a language, you need to tell PHPMailer which one to use, like this: ```php // To load the French version $mail->setLanguage('fr', '/optional/path/to/language/directory/'); ```
最新文章
雅思教学培养方案怎么写(雅思培训课程是怎么设置的)
1、第三个方法,社交学习法。每个人都会有疲倦期,这个时候,我们需要内外刺激,而社交学习法就属于外部刺激。也就对应了一句话“一个人可以走得很快,但是一群人才能走得很远。2、雅思如何自学方法如下:听力:雅思词汇是雅思正常考试的核
百度快速排名优化工具(百度seo快速排名优化)
在当今竞争激烈的网络环境中,网站的排名对于企业和个人的在线存在至关重要,百度作为国内最大的搜索引擎之一,其搜索结果页面的排名直接影响着网站的流量和曝光度,为了在百度上获得更好的排名,许多网站所有者和 SEO 从业者开始寻求百度
开发销售打卡“神器”获刑
2023年8月,刚大学毕业的小张到宁波找工作,面试几家公司后发现多数公司都需要通过App来考勤打卡,他觉得特别麻烦,在和同学聚餐时聊起此事,同学向他推荐了一个可以实现虚拟定位打卡的网站。小张登录了这个网站,加了网站管理员的微信。在
使用宝塔搭建环境,以及把自己本地的Web项目通过宝塔发布到远程云服务器上
使用宝塔搭建服务器的环境 什么是搭建服务器环境 所谓的搭建环境其实也就是下载应用,然后把应用对应的端口号在三个地方开启,这三个地方分别是,宝塔的安全菜单的防火墙,阿里云的安全组,阿里云云服务器中
非常聪明的AI眼镜即将到来!VRETF(159786)今日微跌0.67%,利亚德涨19.94%
AI眼镜方向传来新消息。据领益智造消息,12月13日,在AndroidXR发布会上,谷歌与国内消费级AR眼镜厂商XREAL达成了战略合作,共同打造AndroidXR生态。。2024年12月13日,A股市场震荡调整。VR指数成份股中,利亚德涨19.94%,奥飞娱乐涨10.03%
重庆网站建设seo公司 重庆SEO网站建设公司优化指南
重庆网站建设SEO公司:打造企业网络新生态的领航者在当今数字化时代,互联网已成为企业展示形象、拓展市场、提升品牌影响力的核心平台而对于地处西南经济重镇的重庆企业而言,拥有一个高效、美观且具备强大SEO(搜索引擎优化)能力的网站,
文章提取关键词_jieba(IF-IDF/TextRank)
对每个句子进行分词和词性标注处理过滤掉除指定词性外的其他单词,过滤掉出现在停用词表的单词,过滤掉长度小于2的单词将剩下的单词中循环选择一个单词,将其与其后面4个单词分别组合成4条边。
李开复2024年的关键词是AI2.0
来源:@中国企业家杂志微博
百度的关键词排名是多少?如何提升网站排名,让您的业务脱颖而出
百度非常注重网站内容的质量和相关性。如果网站提供的内容对用户有价值,能够满足用户的需求,百度就会优先考虑将其排名提升。因此,确保网站内容丰富、原创且与关键词密切相关,是提升排名的关键。关键词的选择和合理布局至关重要。在网页
搜索权益双周加速营问答:站点LOGO权限与百度小程序相关问题 二
以下是的第二部分,也是官方对百度百度小程序的相关答疑,大家可以仔细看看。悦然网络工作室建议大家在做企业网站建设时从一开始就考虑到百度小程序制作和适配,争取做好网站就能开通百度站点LOGO权限和等权限。收集:答:站点Logo在PC端、
相关文章
推荐文章
发表评论
0评