PHPackages                             rafansilva/emailsender - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Mail &amp; Notifications](/categories/mail)
4. /
5. rafansilva/emailsender

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

rafansilva/emailsender
======================

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

1.0.1(5y ago)120MITPHPPHP ^7.1

Since Mar 5Pushed 4y ago1 watchersCompare

[ Source](https://github.com/rafansilva/emailsender)[ Packagist](https://packagist.org/packages/rafansilva/emailsender)[ RSS](/packages/rafansilva-emailsender/feed)WikiDiscussions main Synced 5d ago

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

EmailSender Library
===================

[](#emailsender-library)

[![Maintainer](https://camo.githubusercontent.com/9b192f06c1f36fee84f0781705210ba70daf85b335b00d8166625f11ed309506/687474703a2f2f696d672e736869656c64732e696f2f62616467652f6d61696e7461696e65722d40726166616e73696c76612d626c75652e7376673f7374796c653d666c61742d737175617265)](https://github.com/rafansilva/)[![Source Code](https://camo.githubusercontent.com/4c2b61205246bd718fd73d346684de335ce04fc35a68e84d2f8628c5291b0595/687474703a2f2f696d672e736869656c64732e696f2f62616467652f736f757263652d726166616e73696c76612f656d61696c73656e6465722d626c75652e7376673f7374796c653d666c61742d737175617265)](https://github.com/rafansilva/emailsender)[![PHP from Packagist](https://camo.githubusercontent.com/66a27b5440299e3d8b43ac9523b6aefff957d288f56274658cb807ee48387178/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f726166616e73696c76612f656d61696c73656e6465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/rafansilva/emailsender)[![Latest Version](https://camo.githubusercontent.com/720842ffd13f034fa5d73dd3b1bde968dfb568292241d1fadc6165fab5c74390/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f726166616e73696c76612f656d61696c73656e6465722e7376673f7374796c653d666c61742d737175617265)](https://github.com/rafansilva/emailsender/releases)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Build](https://camo.githubusercontent.com/64362e35f5c8bf606b0898cc20e0c234e84ee51a4e5d20c98818f63cee721ec7/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f6275696c642f672f726166616e73696c76612f656d61696c73656e6465722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/rafansilva/emailsender)[![Quality Score](https://camo.githubusercontent.com/b852ca731833df6b72b987cf4afbd1b255cc8c9bad75ca998a4382ae2ca65dea/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f726166616e73696c76612f656d61696c73656e6465722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/rafansilva/emailsender)[![Total Downloads](https://camo.githubusercontent.com/1a18876e047d204d84110882ce50a8b263219ae841d61b0368d88310d2192d80/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f726166616e73696c76612f656d61696c73656e6465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/rafansilva/emailsender)

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

[](#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

[](#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
------------

[](#installation)

Uploader is available via Composer:

```
"rafansilva/emailsender": "^1.0"
```

or run

```
composer require rafansilva/emailsender
```

Documentation
-------------

[](#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:

[](#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:

[](#setup-to-send-an-email)

```
