• P7_931062
  • 6.9KB
  • zip
  • 0
  • VIP专享
  • 0
  • 2022-05-18 08:08
SMTP协议 此程序包是从头开始构建的新SMTP类。 现有的许多电子邮件库都是旧的,肿的,不在GitHub上,而且最糟糕的是使用camelcase编写的。 我想要一些简单的东西。 安装 通过Composer正常安装。 设定档 每次创建新的SMTP对象时,都必须传递一个配置数组。 这就是我们使软件包框架不可知的方式。 随附的配置文件是您必填字段和值的参考。 一种方法是直接从文件传递数组: $ mail = new Travis \ SMTP ( require __DIR__ . '/path/to/config.php' ); 另一种方法是在将文件手动复制到app/config/smtp.php后,使用Laravel传递配置: $ mail = new Travis \ SMTP ( Config :: get ( 'smtp' )); 请注意,您的配置包括多个连接,并且您可
# SMTP This package is a new SMTP class built from scratch. Many of the existing email libraries are old, bloated, not on GitHub, and worst of all written in camelcase. I wanted something short and simple. ## Install Normal install via Composer. ## Config Everytime you make a new SMTP object, you have to pass a config array. This is how we make the package framework agnostic. The included config file is your reference for the required fields and values. One method is to pass the array directly from the file: ```php $mail = new Travis\SMTP(require __DIR__ . '/path/to/config.php'); ``` Another method is to use Laravel to pass a config after manually copying the file to ``app/config/smtp.php``: ```php $mail = new Travis\SMTP(Config::get('smtp')); ``` Note that your config includes multiple connections, and you can choose which one to use when you forge the object: ```php $mail = new Travis\SMTP($config, 'amazon'); ``` You can also set a default connection in the config array. ## Usage A normal email would go like this: ```php use Travis\SMTP; $mail = new SMTP($config); $mail->to(''); $mail->from('', 'Paul T.'); // email is required, name is optional $mail->subject('Hello World'); $mail->body('This is a <b>HTML</b> email.'); $result = $mail->send(); ``` You can add multiple recipients, name is optional: ```php // add to $mail->to(''); $mail->to(''); // add cc $mail->cc(''); $mail->cc(''); // add bcc $mail->bcc(''); $mail->bcc(''); ``` You can set a custom reply-to address: ```php $mail->reply('', 'Paul T.'); ``` You can add attachments: ```php $mail->attach('/path/to/file1.png'); $mail->attach('/path/to/file2.png'); ``` You can assign a text version of your email: ```php $mail->text('This is a text email.'); ``` You can send text-only emails: ```php $result = $mail->send_text(); ``` ### Debug Mode In the config you can flag ``'debug_mode' = true;``, which can be helpful in testing your SMTP connections. It will echo server responses from each step in the email sending process. ## Limitations Below are some current limitations. Please feel free to contribute to this ongoing project. * Does not support encryption. * Does not support priority level. * Does not keep connection open for spooling email sends.
    • composer-install:GitHub动作可简化Composer依赖项的安装
      一个GitHub Action,可简化Composer依赖项的安装。 关于 ramsey / composer-install是一个GitHub Action,可简化工作流程中Composer依赖项的安装。 它会安装您的Composer依赖项并对其进行缓存,以缩短构建时间。 ...
    • Satis网站上
    • composer:在您的Github操作中使用Composer CLI
      在您的Github操作中使用Composer CLI。 Composer是用于PHP中的依赖项管理的工具。它允许您声明项目所依赖的库,并将为您管理(安装/更新)它们。 如果您运行的测试一样, 或在Github上的行动,那么你就需要使用...
    • ComposerPHP
      Composer - 一个PHP的依赖管理器,帮助您声明,管理和安装PHP项目的依赖关系
    • kimeo:GitHub的失物招募记者
      Kimeo:缺少的GitHub贡献者记者 Kimeo是一个微型CLI应用程序(和一个简约的Web客户端),能够为一段时间内选定的分支列表生成合并的PR列表。 安装 登录名/密码凭证是您的GitHub的凭证。 dev@dev: ~ $ composer ...
    • composer-normalize-action:+提供运行ergebniscomposer-normalize的GitHub
      在.github/workflows/continuous-integration.yml定义工作流程(或者,如果您已经定义了工作流程,则添加作业)。 :light_bulb: 阅读有关更多信息。 默认行为 默认情况下,此操作将运行 $ composer normalize 在...
    • composer
      GITHUB_OAUTH_CLIENT_ID =“ 59667ce1e084aed83b07” GITHUB_OAUTH_REDIRECT_URI =“ ” GITHUB_OAUTH_CLIENT_SECRET =“ 53cc97007cc2ccc06c1a76118313355f9195f66b” SPOTIFY_OAUTH_CLIENT_ID =“ cdc7fadc47374f...
    • composer:洋葱项目
      作曲家用户界面 在查看作曲家用户界面 在查看频谱图可视化 请注意,这些页面仅适用于 Chrome。
    • github-webhook