rafansilva/emailsender 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

rafansilva/emailsender

Composer 安装命令:

composer require rafansilva/emailsender

包简介

Uma biblioteca simples para enviar e-mails que abstrai o comportamento da PHPMAILER

README 文档

README

Maintainer Source Code PHP from Packagist Latest Version Software License Build Quality Score Total Downloads

EmailSender is a class that abstracts the behavior of the PhpMailer component, and simplifies the sending of emails via SMTP.

EmailSender é uma classe que abstrai o comportamento do componente PHPMailer, e simplifica o envio de e-mails via SMTP.

Highlights

  • Simple installation (Instalação simples)
  • Simplified initial setup (Configuração inicial simplificada)
  • Simple methods for sending emails and attachments (Métodos simples para envio de e-mails e anexos)
  • Composer ready and PSR-2 compliant (Pronto para o composer e compatível com PSR-2)

Installation

Uploader is available via Composer:

"rafansilva/emailsender": "^1.0"

or run

composer require rafansilva/emailsender

Documentation

For details on how to use, see a sample folder in the component directory. In it you will have an example of use for each class. It works like this:

Para mais detalhes sobre como usar, veja uma pasta de exemplo no diretório do componente. Nela terá um exemplo de uso da classe. Ele funciona assim:

Setup to send an email:

<?php

/**
 * TIP: Put these constants in your project's config file.
 */
define("CONF_MAIL_HOST", "smtp.example.com"); //Set the SMTP server to send through
define("CONF_MAIL_PORT", 587); //TCP port to connect to, use 465 for `PHPMailer::ENCRYPTION_SMTPS`
define("CONF_MAIL_USER", "user@example.com"); //SMTP username
define("CONF_MAIL_PASS", "password"); //SMTP password
define("CONF_MAIL_SENDER", ["name" => "yourName", "address" => "your@email.com"]); //Change here the name and email of who will send the email
define("CONF_MAIL_OPTION_DEBUG", 0); //To enable verbose debug output use 2 or 0 to disable
define("CONF_MAIL_OPTION_LANG", "br"); //Your language
define("CONF_MAIL_OPTION_HTML", true); //Set email format to HTML
define("CONF_MAIL_OPTION_AUTH", true); //Enable SMTP authentication
define("CONF_MAIL_OPTION_SECURE", "tls"); //Enable TLS encryption
define("CONF_MAIL_OPTION_CHARSET", "utf-8"); //Default charset is utf-8

Example of sending email and attachments:

<?php

require __DIR__ . '/../vendor/autoload.php';

use RafaNSilva\Support\Email;

$mail = new Email();

$mail->bootstrap(
    "Example of sending email",
    "<h1>This is the HTML message body</h1>",
    "joe@example.net",
    "Joe User"
)->send();

$mail->bootstrap(
    "Email with Attachments",
    "<p>See the attachment below</p>",
    "joe@example.net",
    "Joe User"
)->attach(__DIR__ . "/image/joinha.jpg", "Joinha")->send();

Contributing

Please see CONTRIBUTING for details.

Support

Security: If you discover any security related issues, please email rafaelnascimento0505@gmail.com instead of using the issue tracker.

Se você descobrir algum problema relacionado à segurança, envie um e-mail para rafaelnascimento0505@gmail.com em vez de usar o rastreador de problemas.

Thank you

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 20
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-03-05

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固