Download the PHP package tobento/service-mail without Composer

On this page you can find all versions of the php package tobento/service-mail. 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 service-mail

Mail Service

Mailer interface for PHP applications using the Symfony Mailer as default mailer implementation.

Table of Contents

Getting started

Add the latest version of the mail service project running this command.

Requirements

Highlights

Documentation

Basic Usage

Creating And Sending Messages

Check out the available Mailers.

Check out the Message to learn more about it.

Message

Email Addresses

Contents

Headers

File Attachments

Tags And Metadata

Queue

You may queue your message if your mailer is configured to support it.

Check out the Symfony Mailer - Queue Support for support.

Send With Mailer

You may define a mailer used to send the message if your mailer supports it.

Check out the Mailers for more detail.

Custom Parameters

You may write your own parameters in the following way:

Check out the Symfony Custom Parameters Support for handling your custom parameter.

Mailer

Null Mailer

The does not send any mail message at all which may be useful while developing (or testing).

SF Mailer

Documentation is in the Symfony Mailer section.

Mailers

You may use the following mailers as your MailerInterface implementation for supporting the Send With Mailer parameter.

Default Mailers

Lazy Mailers

The lazy mailers class creates the mailer only on demand.

Templating

The following examples are aimed for the default renderer .

Writing Views

The welcome view template

A variable called message, which is an instance of is available on every view.

Furthermore, use css file assests to design your template. When the template gets rendered, it will convert them to inline styles for better email clients support.

Render Templates

You may want to render a template for an email web view, debugging or other purposes.

Events

You may listen to the following events if your mailer is configured to support it.

Event Description
The Event will be fired after sending the message.
The Event is fired if the message could not be sent.
The Event will be fired after queuing the message.

Check out the Symfony Mailer - Events Support to create the mailer supporting events.

Symfony

Symfony Mailer

Check out the View Service to learn more about it.

Events Support

In order to support events you will need to pass a dispatcher to the mailer:

Queue Support

In order to support queuing messages you will need to pass a queue handler to the mailer.

Consider using the default queue handler using the Queue Service:

First, install the queue service:

Next, pass the queue handler to the mailer:

Finally, make sure the container of the job processor has the following interfaces available:

Example using the Service Container as container:

Default Addresses And Parameters

You may set default addresses and/or parameters to be applied to every message:

Html To Text Converting

If you create a message without text content, it will be created from your html content.

Symfony Dsn Mailer Factory

Symfony Smtp Mailer Factory

Symfony Custom Parameters Support

In order to support your custom parameters you could write a new email factory class or extend the default:

Credits


All versions of service-mail with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
tobento/service-view Version ^1.0.7
tobento/service-filesystem Version ^1.0.5
tobento/service-autowire Version ^1.0
symfony/mailer Version ^6.0
tijsverkoyen/css-to-inline-styles Version ^2.2.5
psr/container Version ^2.0
psr/http-message Version ^1.0
psr/event-dispatcher Version ^1.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 tobento/service-mail contains the following files

Loading the files please wait ....