Download the PHP package ublaboo/mailing without Composer

On this page you can find all versions of the php package ublaboo/mailing. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package mailing

Build Status Scrutinizer Code Quality Latest Stable Version License Total Downloads Gitter

Mailing

Extension for Nette Framework: Easy & object-oriented way of sending & logging mails

Mailing extension lets you send/log emails in the object oriented world.

Overview

Downloading Mailing

Mailing is available through composer package ublaboo/mailing:

MailFactory

MailFactory gives you a way to create your mails instances. In the background it sets some parameters, decides whether to log and email or not, tries to find mail template etc.

Mail

Mail is the base class you will extend in each of your email cases (classes). In your particular mail class you will set email senders/recipients/cc/.., basepath (if you want to send inline images), attach files, etc. There are also available config parameters (if you have put them in there through config.neon).

You will send it via Mail::send() method.

Create mail class

Once you have registered mailing extension, you can create new mail class and then get MailFactory from DIC to send it:

Example mail template:

Mail templates

Now, there is some convention in directory structure and you should stick to it. It doesn't matter where you put your mails, but the Mail class (which your mails will inherit from) will look for template latte files in <same_directory_as_your_mails_are</templates. The name of particular template has to be in camel_case naming convention. E.g.:

But that is only a recommendation. You can always change your template file path by Mail::setTemplateFile(). Eg:

Or from the outside:

No templates

Of course you don't have to send mails with templates, you can just use plaintext mail body. You would do that probably in your mail class:

Configuration

There are some configuration options available like whether to log (or send, or both), where to log, where to find inline images from, etc

Start with registering extension in config.neon:

There are several config options:

Let's discuss each of these options:

do

In this option you may choose between these three directives:

logDirectory

That one is pretty obvious. Directory, where mail files (.eml) will be stored.

mailImagesBasePath

This is the path, where Nette\Mail\Message will look for all images that can be inline embedded in mail.

mails

This array filled with your parameters (probably mail addresses - like recipients, senders, etc) will be available in instance of each of your mail class (read more) so that you can easily set sender and recipient, bcc, cc or whatever you need for particular mail.

E.g.:

Log

By default, MailLogger is logging all sent Mails in log directory in format ///. As you can see, the .eml extension is used to easily open an email file in all desktop clients.


All versions of mailing with dependencies

PHP Build Version
Package Version
Requires php Version >= 7.1
nette/utils Version ~2.4 || ~3.0
nette/di Version ~2.4 || ~3.0
nette/application Version ~2.4 || ~3.0
nette/mail Version ~2.4 || ~3.0
latte/latte Version ~2.4 || ~3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ublaboo/mailing contains the following files

Loading the files please wait ....