Download the PHP package adcog-cpi/email-bundle without Composer

On this page you can find all versions of the php package adcog-cpi/email-bundle. 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 email-bundle

EBEmailBundle

Minimum configuration

Just add your senders (only one is required actually) :

eb_email:
    senders:
        -
            name: John DOE
            email: [email protected]
    emails: []

Configure your emails

We have to send a contact email with a specific subject and body.

eb_email:
    # ...
    emails:
        contact:
            subject: 'New contact !'
            text_template: 'AppBundle:Email:_contact.txt.twig'

If you want to send an email with an alternative text/plain and text/html just use the html_template key :

eb_email:
    # ...
    emails:
        contact:
            subject: 'New contact !'
            text_template: 'AppBundle:Email:_contact.txt.twig'
            html_template: 'AppBundle:Email:_contact.html.twig'

You can use twig syntax in your subject :

eb_email:
    # ...
    emails:
        contact:
            subject: 'New contact from {{contact.name}} !'
            # ...

Send your email

$this->get('eb_email')->send('contact', '[email protected]');

With 2 recipients :

$this->get('eb_email')->send('contact', [
    '[email protected]',
    '[email protected]',
]);

With a user object implementing a getUsername method :

$this->get('eb_email')->send('contact', $user);

With a templating message var :

$this->get('eb_email')->send('contact', '[email protected]', [
    'message' => $message,
]);

With an header image <img src="{{ header }}"/> :

$this->get('eb_email')->send('contact', '[email protected]', [
    'message' => $message,
], [
    'header' => '/var/header.png',
]);

With a PDF attachment :

$this->get('eb_email')->send('contact', '[email protected]', [
    'message' => $message,
], [], [
    '/var/attachment.pdf',
]);

Configure globals, images, attachments and recipients for all mails

Add app_name global variable to all emails :

eb_email:
    # ...
    globals:
        app_name: BundleDemo

Add header and footer images to all emails (useful for a twig layout) :

eb_email:
    # ...
    images:
        header: /var/header.png
        footer: /var/footer.png

Add some PDF to all emails :

eb_email:
    # ...
    attachments:
        - /var/terms.pdf

Add recipients to all emails :

eb_email:
    # ...
    recipients:
        -
            name: AppName
            email: [email protected]

Configure images and attachments for one email

Add the map image to the contact email :

eb_email:
    # ...
    emails:
        contact:
            # ...
            images:
                map: /var/map.png

Add one PDF to the contact email :

eb_email:
    # ...
    emails:
        contact:
            # ...
            attachments:
                - /var/satisfaction.pdf

Add one default recipient to the contact email :

eb_email:
    # ...
    emails:
        contact:
            # ...
            recipients:
                -
                    name: AppName
                    email: [email protected]

Full configuration

# Default configuration for "EBEmailBundle"
eb_email:
    senders:              # Required

        # Sender name
        name:                 ~ # Required, Example: John Doe

        # Sender email
        email:                ~ # Required, Example: [email protected]

    # Global to add in each template
    globals:              # Example: A parameter

        # Prototype
        name:                 ~

    # Images to attach inline
    images:               # Example: /path/to/file

        # Prototype
        name:                 ~

    # Files to attach
    attachments:          [] # Example: /path/to/file
    recipients:

        # Recipient name
        name:                 ~ # Required, Example: John Doe

        # Recipient email
        email:                ~ # Required, Example: [email protected]
    emails:

        # Prototype
        name:

            # Text Template
            text_template:        ~ # Required, Example: AcmeDefautBundle::_text_email.html.twig

            # HTML Template
            html_template:        null # Example: AcmeDefautBundle::_html_email.html.twig

            # Email subject
            subject:              ~ # Required, Example: Welcome {{user.username}} to {{app_name}} !

            # Global to add in this template
            globals:              # Example: A parameter

                # Prototype
                name:                 ~

            # Images to attach inline
            images:               # Example: /path/to/file

                # Prototype
                name:                 ~

            # Files to attach
            attachments:          [] # Example: /path/to/file
            recipients:

                # Recipient name
                name:                 ~ # Required, Example: John Doe

                # Recipient email
                email:                ~ # Required, Example: [email protected]

All versions of email-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4
symfony/swiftmailer-bundle Version ~2.3
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 adcog-cpi/email-bundle contains the following files

Loading the files please wait ....