2017 © Pedro Peláez
 

library mail

Email plugin provides generalized functionality to compose and send both text and MIME-compliant multipart email messages.

image

slick/mail

Email plugin provides generalized functionality to compose and send both text and MIME-compliant multipart email messages.

  • Saturday, October 7, 2017
  • by fsilva
  • Repository
  • 1 Watchers
  • 0 Stars
  • 175 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 8 Versions
  • 1 % Grown

The README.md

Slick Mail

Latest Version Software License Build Status Coverage Status Quality Score Total Downloads, (*1)

Email plugin provides generalized functionality to compose and send both text and MIME-compliant multi-part e-mail messages., (*2)

This package is compliant with PSR-2 code standards and PSR-4 autoload standards. It also applies the semantic version 2.0.0 specification., (*3)

Features, (*4)

  • Easy mail transport creation (SMTP, PHP mail())
  • Uses Twig for a robust template engine
  • Multi-Part e-mail messages

Installation, (*5)

To use E-Mail plugin in your project just run the following command:, (*6)

$ composer require slick/mail

Quick Start, (*7)

Create a message:, (*8)

``` php use Slick\Mail\Message; use Slick\Mail\MessageBody;, (*9)

$message = new Message(); $message->setFrom('some@from.address', 'Slick Mail') ->addTo('you@example.com') ->setSubject('Log message');, (*10)

$body = new MessageBody( 'mail/template.twig', ['foo' => $foo, 'bar' => 'baz'] );
$message->setBody($body);, (*11)


If you need to send a multi-part e-mail with text and HTML or embedding images in it for example, you can do like this: ``` php use Slick\Mail\Mime; use Slick\Mail\Mime\MimeMessage; use Slick\Mail\Mime\Part as MimePart; $text = new MimePart('mail/template.twig', ['foo' => $foo, 'bar' => 'baz']); $text->type = "text/plain"; $image = new MimePart('image.jpg'); $image->type = "image/jpeg"; $image->id = "image"; $image->encoding = Mime::ENCODING_BASE64; $html = new MimePart('mail/template.html.twig', ['foo' => $foo, 'bar' => 'baz']); $html->type = "text/html"; $message = new MimeMessage(); $message->parts() ->add($text) ->add($image) ->add($html) ;

As you can see it very easy to compose an e-mail message. Now you need to send it! Lets see:, (*12)

``` php use Slick\Mail\Transport\SmtpTransport;, (*13)

$transport = new SmtpTransport([ 'options' => [ 'name' => 'localhost.localdomain', 'host' => '127.0.0.1', 'port' => 25, ] ]);, (*14)

$transport->send($message);, (*15)

```, (*16)

For a complete documentation on the SMTP transport object and options, as this is an extension to the Zend\Mail\Transport\Smtp class, you can go to the Zend/Mail/transport manual website., (*17)

Contribute, (*18)

Support, (*19)

If you are having issues, please let us know., (*20)

License, (*21)

The project is licensed under the MIT License (MIT), (*22)

The Versions

07/10 2017

dev-support/1.0.x

dev-support/1.0.x

Email plugin provides generalized functionality to compose and send both text and MIME-compliant multipart email messages.

  Sources   Download

MIT

The Requires

 

The Development Requires

mail mime e-mail html e-mail message send e-mail

07/10 2017

v1.0.3

1.0.3.0

Email plugin provides generalized functionality to compose and send both text and MIME-compliant multipart email messages.

  Sources   Download

MIT

The Requires

 

The Development Requires

mail mime e-mail html e-mail message send e-mail

04/08 2016

dev-master

9999999-dev

Email plugin provides generalized functionality to compose and send both text and MIME-compliant multipart email messages.

  Sources   Download

MIT

The Requires

 

The Development Requires

mail mime e-mail html e-mail message send e-mail

04/08 2016

dev-develop

dev-develop

Email plugin provides generalized functionality to compose and send both text and MIME-compliant multipart email messages.

  Sources   Download

MIT

The Requires

 

The Development Requires

mail mime e-mail html e-mail message send e-mail

04/08 2016

v1.1.0

1.1.0.0

Email plugin provides generalized functionality to compose and send both text and MIME-compliant multipart email messages.

  Sources   Download

MIT

The Requires

 

The Development Requires

mail mime e-mail html e-mail message send e-mail

07/01 2015

v1.0.2

1.0.2.0

Email plugin provides generalized functionality to compose and send both text and MIME-compliant multipart email messages.

  Sources   Download

MIT

The Requires

 

The Development Requires

mail mime e-mail html e-mail message send e-mail

06/01 2015

v1.0.1

1.0.1.0

Email plugin provides generalized functionality to compose and send both text and MIME-compliant multipart email messages.

  Sources   Download

MIT

The Requires

 

The Development Requires

mail mime e-mail html e-mail message send e-mail

05/01 2015

v1.0.0

1.0.0.0

Email plugin provides generalized functionality to compose and send both text and MIME-compliant multipart email messages.

  Sources   Download

MIT

The Requires

 

The Development Requires

mail mime e-mail html e-mail message send e-mail