2017 © Pedro Peláez
 

library mail

Library to send e-mails over different transports and protocols (like SMTP and IMAP) using immutable messages and streams. Also includes SMTP server.

image

genkgo/mail

Library to send e-mails over different transports and protocols (like SMTP and IMAP) using immutable messages and streams. Also includes SMTP server.

  • Monday, June 4, 2018
  • by frederikbosch
  • Repository
  • 21 Watchers
  • 372 Stars
  • 4,767 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 18 Forks
  • 4 Open issues
  • 31 Versions
  • 22 % Grown

The README.md

Genkgo/Mail - Modern PHP Mail Library

Latest Version workflow code check, (*1)

While analyzing what mail library to use when refactoring a code base, we discovered that the available ones are mostly legacy libraries. Some do not use namespaces and every library we encountered was merely a collection of scalar property bags than objects using encapsulation. Although we used these libs with joy in the past, they do not meet current quality standards. So, we built a new and better library according to modern programming principles., (*2)

Use this if you want to send e-mails over different transports and protocols using immutable messages and streams., (*3)

Send message quick and easy


use Genkgo\Mail; $message = (new Mail\MessageBodyCollection('<html><body>

Hello World, (*4)

</body></html>')) ->withAttachment(new Mail\Mime\FileAttachment('/order1.pdf', new Mail\Header\ContentType('application/pdf'))) ->createMessage() ->withHeader(new Mail\Header\Subject('Hello World')) ->withHeader(Mail\Header\From::fromEmailAddress('from@example.com')) ->withHeader(Mail\Header\To::fromSingleRecipient('to@example.com', 'name')) ->withHeader(Mail\Header\Cc::fromSingleRecipient('cc@example.com', 'name')); $transport = new Mail\Transport\SmtpTransport( Mail\Protocol\Smtp\ClientFactory::fromString('smtp://user:pass@host/')->newClient(), Mail\Transport\EnvelopeFactory::useExtractedHeader() ); $transport->send($message);

Install using composer

$ composer require genkgo/mail

Features

  • Use SMTP or mail() to send messages
  • Use IMAPv4 to read messages from your mailbox (no extension required)
  • Create replies and forward messages, including quoting of original message
  • Queue messages when transport fails
  • Automatically connects and reconnects after interval to SMTP server
  • Automatically generate alternative text for formatted messages
  • Optimal encoded headers, so no excessive (Q/B) encoded headers
  • Optimal encoded multipart messages
  • Only streams and connections are mutable
  • Messages and actors are immutable
  • Value objects protect against invalid states
  • Streams make sure the library has a low memory burden
  • Many objects but still easy API
  • 90%+ test coverage
  • Uses highest PHPStan detection level
  • Only uses TLS < 1.2 if not otherwise possible
  • Discourages SSL
  • DKIM signed message
  • Security is highly prioritized
  • SMTP server for testing purposes
  • Great RFC compliance
  • Cast messages to valid string source
  • Library has no external dependencies (but uses intl extension)
  • Only supports PHP versions that are not EOL

Upcoming features

  • Encrypted and signed messages

Not planned

The following features are not planned for development by the owners, but could become part of the library when initiative is taken by the community., (*5)

  • POP Support
  • Mailbox abstraction layer

Documentation

RFC-compliance

This library tends to be as compliant with e-mail RFCs as possible. It should be compliant with the following RFCs., (*6)

Credits

This library was not able to exist without Zend/Mail and PHPMailer., (*7)

The Versions

04/06 2018

dev-master

9999999-dev

Library to send e-mails over different transports and protocols (like SMTP and IMAP) using immutable messages and streams. Also includes SMTP server.

  Sources   Download

MIT MIT License

The Requires

  • php ^7.1
  • ext-intl *

 

The Development Requires

by frederik

04/06 2018

2.5.1

2.5.1.0

Library to send e-mails over different transports and protocols (like SMTP and IMAP) using immutable messages and streams. Also includes SMTP server.

  Sources   Download

MIT

The Requires

  • php ^7.1
  • ext-intl *

 

The Development Requires

03/04 2018

2.5.0

2.5.0.0

Library to send e-mails over different transports and protocols (like SMTP and IMAP) using immutable messages and streams. Also includes SMTP server.

  Sources   Download

MIT

The Requires

  • php ^7.1
  • ext-intl *

 

The Development Requires

03/04 2018

dev-reply

dev-reply

Library to send e-mails over different transports and protocols (like SMTP and IMAP) using immutable messages and streams. Also includes SMTP server.

  Sources   Download

MIT

The Requires

  • php ^7.1
  • ext-intl *

 

The Development Requires

08/03 2018

2.4.0

2.4.0.0

Library to send e-mails over different transports and protocols (like SMTP and IMAP) using immutable messages and streams. Also includes SMTP server.

  Sources   Download

MIT

The Requires

  • php ^7.1
  • ext-intl *

 

The Development Requires

05/03 2018

2.3.0

2.3.0.0

Library to send e-mails over different transports and protocols (like SMTP and IMAP) using immutable messages and streams. Also includes SMTP server.

  Sources   Download

MIT

The Requires

  • php ^7.1
  • ext-intl *

 

The Development Requires

14/01 2018

dev-imap-client

dev-imap-client

Library to send e-mails over different transports and protocols (like SMTP) using immutable messages and streams. Also includes SMTP server.

  Sources   Download

MIT License

The Requires

  • php ^7.1
  • ext-intl *

 

The Development Requires

by frederik

11/01 2018

dev-fix-server-client-closing-connection

dev-fix-server-client-closing-connection

Library to send e-mails over different transports and protocols (like SMTP) using immutable messages and streams. Also includes SMTP server.

  Sources   Download

MIT License

The Requires

  • php ^7.1
  • ext-intl *

 

The Development Requires

by frederik

05/01 2018

2.2.0

2.2.0.0

Library to send e-mails over different transports and protocols (like SMTP) using immutable messages and streams. Also includes SMTP server.

  Sources   Download

MIT License

The Requires

  • php ^7.1
  • ext-intl *

 

The Development Requires

by frederik

06/12 2017

2.1.7

2.1.7.0

Library to send e-mails over different transports and protocols using immutable messages and streams

  Sources   Download

MIT License

The Requires

  • php ^7.1
  • ext-intl *

 

The Development Requires

by frederik

06/12 2017

2.1.6

2.1.6.0

Library to send e-mails over different transports and protocols using immutable messages and streams

  Sources   Download

MIT License

The Requires

  • php ^7.1
  • ext-intl *

 

The Development Requires

by frederik

23/11 2017

2.1.5

2.1.5.0

Library to send e-mails over different transports and protocols using immutable messages and streams

  Sources   Download

MIT License

The Requires

  • php ^7.1
  • ext-intl *

 

The Development Requires

by frederik

07/11 2017

2.1.4

2.1.4.0

Library to send e-mails over different transports and protocols using immutable messages and streams

  Sources   Download

MIT License

The Requires

  • php ^7.1
  • ext-intl *

 

The Development Requires

by frederik

07/11 2017

2.1.3

2.1.3.0

Library to send e-mails over different transports and protocols using immutable messages and streams

  Sources   Download

MIT License

The Requires

  • php ^7.1
  • ext-intl *

 

The Development Requires

by frederik

12/10 2017

2.1.2

2.1.2.0

Library to send e-mails over different transports and protocols using immutable messages and streams

  Sources   Download

MIT License

The Requires

  • php ^7.1
  • ext-intl *

 

The Development Requires

by frederik

26/09 2017

2.1.1

2.1.1.0

Library to send e-mails over different transports and protocols using immutable messages and streams

  Sources   Download

MIT License

The Requires

  • php ^7.1
  • ext-intl *

 

The Development Requires

by frederik

26/09 2017

dev-fix_quoted_comma_address_name

dev-fix_quoted_comma_address_name

Library to send e-mails over different transports and protocols using immutable messages and streams

  Sources   Download

MIT License

The Requires

  • php ^7.1
  • ext-intl *

 

The Development Requires

by frederik

25/09 2017

2.1.0

2.1.0.0

Library to send e-mails over different transports and protocols using immutable messages and streams

  Sources   Download

MIT License

The Requires

  • php ^7.1
  • ext-intl *

 

The Development Requires

by frederik

31/08 2017

2.0.8

2.0.8.0

Library to send e-mails over different transports and protocols using immutable messages and streams

  Sources   Download

MIT License

The Requires

  • php ^7.1
  • ext-intl *

 

The Development Requires

by frederik

30/08 2017

dev-server

dev-server

Library to send e-mails over different transports and protocols using immutable messages and streams

  Sources   Download

MIT License

The Requires

  • php ^7.1
  • ext-intl *

 

The Development Requires

by frederik

24/08 2017

2.0.7

2.0.7.0

Library to send e-mails over different transports and protocols using immutable messages and streams

  Sources   Download

MIT License

The Requires

  • php ^7.1
  • ext-intl *

 

The Development Requires

by frederik

24/08 2017

dev-fix_message_id

dev-fix_message_id

Library to send e-mails over different transports and protocols using immutable messages and streams

  Sources   Download

MIT License

The Requires

  • php ^7.1
  • ext-intl *

 

The Development Requires

by frederik

24/08 2017

2.0.6

2.0.6.0

Library to send e-mails over different transports and protocols using immutable messages and streams

  Sources   Download

MIT License

The Requires

  • php ^7.1
  • ext-intl *

 

The Development Requires

by frederik

12/08 2017

dev-dkim

dev-dkim

Library to send e-mails over different transports and protocols using immutable messages and streams

  Sources   Download

MIT License

The Requires

  • php ^7.1
  • ext-intl *

 

The Development Requires

by frederik

26/06 2017

dev-windows

dev-windows

Library to send e-mails over different transports and protocols using immutable messages and streams

  Sources   Download

MIT License

The Requires

  • php ^7.1
  • ext-intl *

 

The Development Requires

by frederik

16/06 2017

2.0.5

2.0.5.0

Library to send e-mails over different transports and protocols using immutable messages and streams

  Sources   Download

MIT License

The Requires

  • php ^7.1
  • ext-intl *

 

The Development Requires

by frederik

11/06 2017

2.0.4

2.0.4.0

Library to send e-mails over different transports and protocols using immutable messages and streams

  Sources   Download

MIT License

The Requires

  • php ^7.1

 

The Development Requires

by frederik

10/06 2017

2.0.3

2.0.3.0

Library to send e-mails over different transports and protocols using immutable messages and streams

  Sources   Download

MIT License

The Requires

  • php ^7.1

 

The Development Requires

by frederik

06/06 2017

2.0.2

2.0.2.0

Library to send e-mails over different transports and protocols using immutable messages and streams

  Sources   Download

MIT License

The Requires

  • php ^7.1

 

The Development Requires

by frederik

05/06 2017

2.0.1

2.0.1.0

Library to send e-mails over different transports and protocols using immutable messages and streams

  Sources   Download

MIT License

The Requires

  • php ^7.1

 

The Development Requires

by frederik

05/06 2017

2.0.0

2.0.0.0

Library to send e-mails over different transports and protocols using immutable messages and streams

  Sources   Download

MIT License

The Requires

  • php ^7.1

 

The Development Requires

by frederik